diff --git a/package.json b/package.json index e5fde2a3adf3446af3ae24f14d222248557a34cb..119eadca26acb2526ff4d335deccc00fea0a02d1 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "storybook:install": "yarn --cwd ./storybook install", "storybook:build": "yarn tailwindcss:build && yarn --cwd ./storybook build --quiet", "storybook:start": "./scripts/frontend/start_storybook.sh", + "storybook:start:skip-fixtures-update": "./scripts/frontend/start_storybook.sh --skip-fixtures-update", "swagger:validate": "swagger-cli validate", "webpack": "NODE_OPTIONS=\"${NODE_OPTIONS:=--max-old-space-size=5120}\" webpack --config config/webpack.config.js", "webpack-vendor": "NODE_OPTIONS=\"${NODE_OPTIONS:=--max-old-space-size=5120}\" webpack --config config/webpack.vendor.config.js", diff --git a/scripts/frontend/start_storybook.sh b/scripts/frontend/start_storybook.sh index b707dcf124dc49d8ee16576c982af3f77d51caa8..990cbe13d47cdaf1d33f8ba34d583bc2e3a0f6f3 100755 --- a/scripts/frontend/start_storybook.sh +++ b/scripts/frontend/start_storybook.sh @@ -4,12 +4,16 @@ if ! [[ -d storybook/node_modules ]]; then yarn storybook:install fi -echo "Storybook needs fixture files to run. Generate or download them." -echo "See: https://docs.gitlab.com/ee/development/testing_guide/frontend_testing.html#frontend-test-fixtures" -read -rp "Download fixtures? (y/N) " response +if [[ "$1" == "--skip-fixtures-update" ]]; then + echo "Proceeding without installing fixtures." +else + echo "Storybook needs fixture files to run. Generate or download them." + echo "See: https://docs.gitlab.com/ee/development/testing_guide/frontend_testing.html#frontend-test-fixtures" + read -rp "Download fixtures? (y/N) " response -if [ "$response" = "y" ]; then - ./scripts/frontend/download_fixtures.sh + if [ "$response" = "y" ]; then + ./scripts/frontend/download_fixtures.sh + fi fi yarn tailwindcss:build