mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 06:31:27 +08:00
CHANGE netlify so it only builds docs (#7064)
CHANGE netlify so it only builds docs
This commit is contained in:
commit
8f97521297
@ -173,20 +173,20 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@ndhoule/map" "^2.0.1"
|
"@ndhoule/map" "^2.0.1"
|
||||||
|
|
||||||
"@storybook/client-logger@5.1.1":
|
"@storybook/client-logger@5.1.3":
|
||||||
version "5.1.1"
|
version "5.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.1.1.tgz#e62a214a801079e75b4b101afd73cc66c262701d"
|
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.1.3.tgz#6d9f45fdac7d3f2f65d1238c35df11170c2f8b68"
|
||||||
integrity sha512-I0j9tGyjQpLC7dKhQuotJzaAl9j6++hJdUT5ieoqVIC4Hya15wIyc63lpa6ugXQLeRpW73x72CTFV8K+132Qow==
|
integrity sha512-/86NGA7NPsAktpA0lSnw0NhgdqS7Grz08wE7Paz+qLDj1AxnttTvMZctWJ8bLAa3EeJ9wHXGak854CmGiVFnWA==
|
||||||
dependencies:
|
dependencies:
|
||||||
core-js "^3.0.1"
|
core-js "^3.0.1"
|
||||||
|
|
||||||
"@storybook/components@5.1.1":
|
"@storybook/components@5.1.3":
|
||||||
version "5.1.1"
|
version "5.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.1.1.tgz#4ca7343009ebd92cdfb79cfa373628d6f3bb12d0"
|
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.1.3.tgz#9c6898f8f66bf6b9dfdb3ecca73370f2d799e546"
|
||||||
integrity sha512-17rqqxant4zqCNxcESLZR0yAhz1mGHDz6THj8fz5rUncEnSrPYIcdvRKIfeao8yDaiK1Bh48jAjSPdfUO8BngA==
|
integrity sha512-lM+iSdIl/UlmPlgH3vqo8NhMAdPUrWkgp40CVADfXsM6Yxai/23gpg8/HEoHiU5hFjNxowJUt76gTvwt9ak+gg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@storybook/client-logger" "5.1.1"
|
"@storybook/client-logger" "5.1.3"
|
||||||
"@storybook/theming" "5.1.1"
|
"@storybook/theming" "5.1.3"
|
||||||
core-js "^3.0.1"
|
core-js "^3.0.1"
|
||||||
global "^4.3.2"
|
global "^4.3.2"
|
||||||
markdown-to-jsx "^6.9.1"
|
markdown-to-jsx "^6.9.1"
|
||||||
@ -204,14 +204,14 @@
|
|||||||
recompose "^0.30.0"
|
recompose "^0.30.0"
|
||||||
simplebar-react "^1.0.0-alpha.6"
|
simplebar-react "^1.0.0-alpha.6"
|
||||||
|
|
||||||
"@storybook/theming@5.1.1":
|
"@storybook/theming@5.1.3":
|
||||||
version "5.1.1"
|
version "5.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.1.1.tgz#605572b650049457dbd102aa5686933ff2202ace"
|
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.1.3.tgz#705654392b020ef5654c6c500f4398cc7f067653"
|
||||||
integrity sha512-70Pf6XZnTI4wniItQxIhAOQjVi7fDRzR3xZUIBC+pEatbKD+OoyFOALwkww5uW66jeWBYC5AhRPEHWo7ylcXUQ==
|
integrity sha512-ScBAEMkpwY6pHPuD7SYqAwbQ3M4cOEYY2340HtLNR53M6EJ2mcd87rH2kwpTEgTzeA0VuUln6WXEoBz3WRBLYA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@emotion/core" "^10.0.9"
|
"@emotion/core" "^10.0.9"
|
||||||
"@emotion/styled" "^10.0.7"
|
"@emotion/styled" "^10.0.7"
|
||||||
"@storybook/client-logger" "5.1.1"
|
"@storybook/client-logger" "5.1.3"
|
||||||
common-tags "^1.8.0"
|
common-tags "^1.8.0"
|
||||||
core-js "^3.0.1"
|
core-js "^3.0.1"
|
||||||
deep-object-diff "^1.1.0"
|
deep-object-diff "^1.1.0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[build]
|
[build]
|
||||||
publish = "netlify-build"
|
publish = "docs/public"
|
||||||
command = "bash scripts/netlify-build.sh"
|
command = "cd docs && yarn && yarn build && cd .."
|
||||||
[build.environment]
|
[build.environment]
|
||||||
NODE_VERSION = "8"
|
NODE_VERSION = "8"
|
||||||
YARN_VERSION = "1.3.2"
|
YARN_VERSION = "1.3.2"
|
||||||
|
@ -1,117 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Make sure to set $BUILD_CONTEXT in the Netlify "Deploy Settings"
|
|
||||||
echo "Building for Netlify. BUILD_CONTEXT: $BUILD_CONTEXT"
|
|
||||||
|
|
||||||
# Fixes
|
|
||||||
npm i -g process-nextick-args util-deprecate gauge
|
|
||||||
|
|
||||||
yarn
|
|
||||||
yarn bootstrap --core
|
|
||||||
|
|
||||||
if [ "$BUILD_CONTEXT" = "DOCS" ]; then
|
|
||||||
pushd docs
|
|
||||||
yarn install
|
|
||||||
popd
|
|
||||||
yarn docs:build
|
|
||||||
mv docs/public netlify-build
|
|
||||||
elif [ "$BUILD_CONTEXT" = "CRA" ]; then
|
|
||||||
pushd examples/cra-kitchen-sink
|
|
||||||
yarn add tapable # quirk with netlify build instance
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "CRA_TS" ]; then
|
|
||||||
pushd examples/cra-ts-kitchen-sink
|
|
||||||
yarn add tapable # quirk with netlify build instance
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "CRA_REACT15" ]; then
|
|
||||||
pushd examples/cra-react15
|
|
||||||
yarn add tapable # quirk with netlify build instance
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "VUE" ]; then
|
|
||||||
echo "netlify-build Vue examples"
|
|
||||||
pushd examples/vue-kitchen-sink
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "SVELTE" ]; then
|
|
||||||
echo "netlify-build Svelte examples"
|
|
||||||
pushd examples/svelte-kitchen-sink
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "ANGULAR" ]; then
|
|
||||||
echo "netlify-build Angular examples"
|
|
||||||
pushd examples/angular-cli
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "EMBER" ]; then
|
|
||||||
echo "netlify-build Ember examples"
|
|
||||||
pushd examples/ember-cli
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "POLYMER" ]; then
|
|
||||||
echo "netlify-build Polymer examples"
|
|
||||||
pushd examples/polymer-cli
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "PREACT" ]; then
|
|
||||||
echo "netlify-build Preact examples"
|
|
||||||
pushd examples/preact-kitchen-sink
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "MITHRIL" ]; then
|
|
||||||
echo "netlify-build Mithril examples"
|
|
||||||
pushd examples/mithril-kitchen-sink
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "MARKO" ]; then
|
|
||||||
echo "netlify-build Marko examples"
|
|
||||||
pushd examples/marko-cli
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "HTML" ]; then
|
|
||||||
echo "netlify-build HTML examples"
|
|
||||||
pushd examples/html-kitchen-sink
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "OFFICIAL" ]; then
|
|
||||||
echo "netlify-build official examples"
|
|
||||||
pushd examples/official-storybook
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
elif [ "$BUILD_CONTEXT" = "RIOT" ]; then
|
|
||||||
echo "netlify-build riot examples"
|
|
||||||
pushd examples/riot-kitchen-sink
|
|
||||||
yarn
|
|
||||||
yarn build-storybook --quiet
|
|
||||||
mv storybook-static ../../netlify-build
|
|
||||||
popd
|
|
||||||
else
|
|
||||||
RED='\033[0;31m'
|
|
||||||
NOCOLOR='\033[0m'
|
|
||||||
echo "Unrecognized BUILD_CONTEXT \"${RED}$BUILD_CONTEXT${NOCOLOR}\"" 1>&2
|
|
||||||
fi
|
|
Loading…
x
Reference in New Issue
Block a user