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 /> // select SDK page
<SkygearGetStarted sdk="ios" /> // select project type page
<SkygearGetStarted sdk="ios" project="new" /> // project page
// 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 repo 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.