Skip to content

Commit

Permalink
Merge pull request #2304 from cheapsteak/netlify
Browse files Browse the repository at this point in the history
Netlify Deploy Previews
  • Loading branch information
danielduan authored Nov 14, 2017
2 parents f772cd8 + 7bbf441 commit e6b91af
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build]
publish = "netlify-build"
command = "bash scripts/netlify-build.sh"
[build.environment]
NODE_VERSION = "8"
YARN_VERSION = "1.3.2"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
28 changes: 28 additions & 0 deletions scripts/netlify-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

mkdir netlify-build

yarn
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/cra-kitchen-sink
popd

echo "netlify-build Vue examples"
pushd examples/vue-kitchen-sink
yarn build-storybook
mv storybook-static ../../netlify-build/vue-kitchen-sink
popd

2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit e6b91af

Please sign in to comment.