git submodule add <this repo> <location>
git submodule update --init
<location>
is now a npm module you can require from your project.
import SkygearGetStarted from 'skygear-getstarted';
// Usage:
<SkygearGetStarted /> // selection page
<SkygearGetStarted sdk="ios" /> // guide page (project: 'new')
<SkygearGetStarted sdk="ios" project="new" /> // guide page
<SkygearGetStarted sdk="ios" project="new" hideSDKTabs /> // guide page (hidden SDK tabs)
// Throws Error:
<SkygearGetStarted sdk="none" /> // non-existent SDK
<SkygearGetStarted sdk="ios" project="none" /> // non-existent project type
<SkygearGetStarted project="new" /> // SDK not defined
[~]> git clone ...
[~/skygear-getstarted]> ln -sf ../../pre-commit.sh .git/hooks/pre-commit
[~/skygear-getstarted]> npm install
npm run lint
to check syntax.npm run dev
to start local dev server.npm run build
to build artifact. (see below)
IMPORTANT NOTE:
This repository contains a pre-commit hook (pre-commit.sh
) that will:
- run
eslint
- build artifact (
dist/skygear-getstarted.js
) - add artifact to the commit
This is to ensure that the artifact is in-sync with the source code. Errors in the linting and building steps will abort the commit.