Creating a new component
Setup
- Start with an empty folder.
- Optional: Create a new project on GitHub, select project type "Node", clone & use that folder for automatic GitHub integration on init.
- Create a new npm project in that folder (
npm init
) npm install --save-dev react-sapling
- Run
./node_modules/.bin/sapling init
That's it! You now have a component project that's ready to hack on.
Available Commands after init
npm start
: run a development server for your component projectnpm test
: run tests for your componentnpm run build
: build component & docs (to./dist
)npm gh:publish
: publish component docs to GitHub pagesnpm run
: list of other commands available