build: automate build & launch of storybook (#146)

* build: automate build & launch of storybook

- Added `build.py` in the `/packages/superset-ui-plugins-demo` directory
	- Running `build.py` will build & start storybook automatically
	- No need to run 4 separate commands to do so

- Modified README.md to reflect this change and provide instructions on
using `build.py`

* build: delete build.py

Get rid of build.py and transfer commands for
automated building & launching to package.json

* build: automate build & launch of storybook

Use "sudo npm run build" to build & launch Storybook

* docs: update readme

Reflect changes in automated building & launching
of Storybook, now uses command "npm run build"
instead of "python build.py"

* build: rename npm script

rename npm script from "build" to "storybook" and update readme.md to reflect change

* docs: amend error in docs

documentation updated to reflect changes in package.json - command to run story

* docs: change 'npm run' to 'yarn'

replace 'npm run storybook' with 'yarn storybook'
This commit is contained in:
Andreas Lordos 2019-09-09 19:17:06 +03:00 committed by Yongjie Zhao
parent d922d1e244
commit 89591bd559
2 changed files with 8 additions and 1 deletions

View File

@ -106,6 +106,12 @@ You can demo your changes by running the storybook demo locally with the followi
yarn install
yarn build
cd packages/superset-ui-plugins-demo
yarn storybook:run
```
Alternatively, you can demo your changes by using the following command while in `packages/superset-ui-plugins-demo`:
```sh
yarn storybook
```

View File

@ -9,7 +9,8 @@
"demo:build": "build-storybook -o _gh-pages",
"demo:publish": "gh-pages -d _gh-pages",
"deploy-demo": "npm run demo:clean && npm run demo:build && npm run demo:publish && npm run demo:clean",
"storybook": "start-storybook -p 9001"
"storybook:run": "start-storybook -p 9001",
"storybook": "cd ../../ && yarn build && cd - && yarn storybook:run"
},
"repository": {
"type": "git",