From 22979c9b23ec278547586f7131824f949d72027e Mon Sep 17 00:00:00 2001 From: Chang Wang Date: Mon, 13 Nov 2017 17:09:25 -0500 Subject: [PATCH 1/3] add process-nextick-args to dev-dep for netlify --- package.json | 1 + yarn.lock | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7d8af6d1622e..9bccbb1dd76c 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "nodemon": "^1.12.1", "npmlog": "^4.1.2", "prettier": "^1.8.2", + "process-nextick-args": "^1.0.7", "puppeteer": "^0.13.0", "raf": "^3.4.0", "react": "^16.1.0", diff --git a/yarn.lock b/yarn.lock index cdbabe8f3823..264f4e78f150 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9001,7 +9001,7 @@ private@^0.1.6, private@^0.1.7, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" -process-nextick-args@~1.0.6: +process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" From da7fa87895633ae48e4c7f9762a5adb4dc123507 Mon Sep 17 00:00:00 2001 From: Chang Wang Date: Mon, 13 Nov 2017 19:03:54 -0500 Subject: [PATCH 2/3] add build script for netlify --- scripts/netlify-build.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 scripts/netlify-build.sh diff --git a/scripts/netlify-build.sh b/scripts/netlify-build.sh new file mode 100644 index 000000000000..05e229388669 --- /dev/null +++ b/scripts/netlify-build.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +mkdir netlify-build +yarn +yarn add gauge --ignore-workspace-root-check +yarn bootstrap --core +pushd examples/cra-kitchen-sink +yarn build-storybook +mv storybook-static ../../netlify-build +popd +pushd examples/vue-kitchen-sink +yarn build-storybook +mv storybook-static ../../netlify-build From 7bbf441abfa232dea3b0d5834bbbc3e88f6576b4 Mon Sep 17 00:00:00 2001 From: Chang Wang Date: Mon, 13 Nov 2017 20:11:36 -0500 Subject: [PATCH 3/3] add netlify build script and toml config --- netlify.toml | 6 ++++++ scripts/netlify-build.sh | 21 ++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000000..3d2fd195c821 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,6 @@ +[build] + publish = "netlify-build" + command = "bash scripts/netlify-build.sh" +[build.environment] + NODE_VERSION = "8" + YARN_VERSION = "1.3.2" diff --git a/scripts/netlify-build.sh b/scripts/netlify-build.sh index 05e229388669..37bd9661c373 100644 --- a/scripts/netlify-build.sh +++ b/scripts/netlify-build.sh @@ -1,13 +1,28 @@ #!/bin/sh mkdir netlify-build + yarn -yarn add gauge --ignore-workspace-root-check +yarn add gauge --ignore-workspace-root-check # netlify quirk yarn bootstrap --core + +echo "netlify-build docs" +pushd docs +yarn install +popd +yarn docs:build +mv docs/public/* netlify-build/ + +echo "netlify-build React examples" pushd examples/cra-kitchen-sink +yarn add tapable # netlify quirk yarn build-storybook -mv storybook-static ../../netlify-build +mv storybook-static ../../netlify-build/cra-kitchen-sink popd + +echo "netlify-build Vue examples" pushd examples/vue-kitchen-sink yarn build-storybook -mv storybook-static ../../netlify-build +mv storybook-static ../../netlify-build/vue-kitchen-sink +popd +