From b64c2a4c1eafd2cb3d2d0fbe719846de2583abdd Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 12 Jun 2019 13:38:36 +0200 Subject: [PATCH 1/4] CHANGE netlify so it only builds docs --- netlify.toml | 4 +- scripts/netlify-build.sh | 117 --------------------------------------- 2 files changed, 2 insertions(+), 119 deletions(-) delete mode 100755 scripts/netlify-build.sh diff --git a/netlify.toml b/netlify.toml index a2251b21abb..3272e1a44e5 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] - publish = "netlify-build" - command = "bash scripts/netlify-build.sh" + publish = "docs/public" + command = "yarn bootstrap --docs --core && yarn docs:build" [build.environment] NODE_VERSION = "8" YARN_VERSION = "1.3.2" diff --git a/scripts/netlify-build.sh b/scripts/netlify-build.sh deleted file mode 100755 index 06098fc89cb..00000000000 --- a/scripts/netlify-build.sh +++ /dev/null @@ -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 From a226c2d071c6cda36d2bbc52d27c1cdbefe98ff6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 12 Jun 2019 21:20:55 +0200 Subject: [PATCH 2/4] Use published version for docs --- docs/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/package.json b/docs/package.json index d87c8666ff6..dd17b5d3de5 100644 --- a/docs/package.json +++ b/docs/package.json @@ -15,8 +15,8 @@ "serve": "gatsby serve" }, "dependencies": { - "@storybook/components": "5.2.0-unreleased.0", - "@storybook/theming": "5.2.0-unreleased.0", + "@storybook/components": "5.1.3", + "@storybook/theming": "5.1.3", "babel-loader": "^6.4.1", "babel-plugin-styled-components": "^1.10.0", "bootstrap": "^4.3.1", From 1fddb1f1dca902e05725eb4d0dc62f07fd6b5fde Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 12 Jun 2019 21:33:40 +0200 Subject: [PATCH 3/4] FIX lockfile for docs --- docs/yarn.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index 77f80416cce..88064121dbb 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -173,20 +173,20 @@ dependencies: "@ndhoule/map" "^2.0.1" -"@storybook/client-logger@5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.1.1.tgz#e62a214a801079e75b4b101afd73cc66c262701d" - integrity sha512-I0j9tGyjQpLC7dKhQuotJzaAl9j6++hJdUT5ieoqVIC4Hya15wIyc63lpa6ugXQLeRpW73x72CTFV8K+132Qow== +"@storybook/client-logger@5.1.3": + version "5.1.3" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.1.3.tgz#6d9f45fdac7d3f2f65d1238c35df11170c2f8b68" + integrity sha512-/86NGA7NPsAktpA0lSnw0NhgdqS7Grz08wE7Paz+qLDj1AxnttTvMZctWJ8bLAa3EeJ9wHXGak854CmGiVFnWA== dependencies: core-js "^3.0.1" -"@storybook/components@5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.1.1.tgz#4ca7343009ebd92cdfb79cfa373628d6f3bb12d0" - integrity sha512-17rqqxant4zqCNxcESLZR0yAhz1mGHDz6THj8fz5rUncEnSrPYIcdvRKIfeao8yDaiK1Bh48jAjSPdfUO8BngA== +"@storybook/components@5.1.3": + version "5.1.3" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.1.3.tgz#9c6898f8f66bf6b9dfdb3ecca73370f2d799e546" + integrity sha512-lM+iSdIl/UlmPlgH3vqo8NhMAdPUrWkgp40CVADfXsM6Yxai/23gpg8/HEoHiU5hFjNxowJUt76gTvwt9ak+gg== dependencies: - "@storybook/client-logger" "5.1.1" - "@storybook/theming" "5.1.1" + "@storybook/client-logger" "5.1.3" + "@storybook/theming" "5.1.3" core-js "^3.0.1" global "^4.3.2" markdown-to-jsx "^6.9.1" @@ -204,14 +204,14 @@ recompose "^0.30.0" simplebar-react "^1.0.0-alpha.6" -"@storybook/theming@5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.1.1.tgz#605572b650049457dbd102aa5686933ff2202ace" - integrity sha512-70Pf6XZnTI4wniItQxIhAOQjVi7fDRzR3xZUIBC+pEatbKD+OoyFOALwkww5uW66jeWBYC5AhRPEHWo7ylcXUQ== +"@storybook/theming@5.1.3": + version "5.1.3" + resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.1.3.tgz#705654392b020ef5654c6c500f4398cc7f067653" + integrity sha512-ScBAEMkpwY6pHPuD7SYqAwbQ3M4cOEYY2340HtLNR53M6EJ2mcd87rH2kwpTEgTzeA0VuUln6WXEoBz3WRBLYA== dependencies: "@emotion/core" "^10.0.9" "@emotion/styled" "^10.0.7" - "@storybook/client-logger" "5.1.1" + "@storybook/client-logger" "5.1.3" common-tags "^1.8.0" core-js "^3.0.1" deep-object-diff "^1.1.0" From 50486926cef3e05fe6bc9140965a5ea22b592cd4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 12 Jun 2019 23:05:07 +0200 Subject: [PATCH 4/4] simplify docs netlify command --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 3272e1a44e5..359e4c9a27f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] publish = "docs/public" - command = "yarn bootstrap --docs --core && yarn docs:build" + command = "cd docs && yarn && yarn build && cd .." [build.environment] NODE_VERSION = "8" YARN_VERSION = "1.3.2"