Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Previews of deployed examples via Netlify #2304

Merged
merged 3 commits into from
Nov 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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