Fixed configuration to build Storybook on Netlify. (#8088)

This commit is contained in:
Nick Taylor 2020-05-27 12:44:30 -04:00 committed by GitHub
parent f7a3664415
commit 26c66b34d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

2
.gitignore vendored
View file

@ -43,7 +43,7 @@ yarn-debug.log*
.yarn-integrity
# Ignore storybook static site generation
storybook-static/
app/javascript/storybook-static/
yarn-error.log
# Ignore package-lock.json because we use yarn

View file

@ -8,3 +8,4 @@
[build]
# base set in Netlify settings UI
command = "npm install && npm run build-storybook"
publish = "storybook-static"

View file

@ -15,11 +15,11 @@
"scripts": {
"api-docs:lint": "spectral lint -F hint -v docs/api_v0.yml && lint-openapi -e docs/api_v0.yml",
"api-docs:serve": "redoc-cli serve docs/api_v0.yml --options.pathInMiddlePanel --options.jsonSampleExpandLevel=all --options.menuToggle -t docs/api_template.hbs --watch",
"generate-themes-storybook": "node-sass app/assets/stylesheets/themes -o storybook-static/themes",
"build-storybook": "build-storybook -c app/javascript/.storybook -s app/assets --quiet",
"generate-themes-storybook": "node-sass app/assets/stylesheets/themes -o app/javascript/storybook-static/themes",
"build-storybook": "build-storybook -c app/javascript/.storybook -s app/assets -o app/javascript/storybook-static --quiet",
"postbuild-storybook": "npm run generate-themes-storybook",
"prestorybook": "npm run generate-themes-storybook",
"storybook": "start-storybook -p 6006 -c app/javascript/.storybook -s app/assets,storybook-static",
"storybook": "start-storybook -p 6006 -c app/javascript/.storybook -s app/assets,app/javascript/storybook-static",
"test": "jest app/javascript/ --coverage",
"test:watch": "jest app/javascript/ --watch"
},