push workspace enabled to initial command; remove second yarn install; use npx to call gitbook cli commands
This commit is contained in:
parent
fd720bd4d7
commit
ff21408440
@ -7,7 +7,6 @@ cd "$(dirname "$0")"
|
|||||||
# Helpful to verify which versions we're using
|
# Helpful to verify which versions we're using
|
||||||
yarn -v
|
yarn -v
|
||||||
node -v
|
node -v
|
||||||
yarn config set workspaces-experimental true
|
|
||||||
|
|
||||||
# Install GitBook CLI
|
# Install GitBook CLI
|
||||||
echo 'Installing Gitbook CLI'
|
echo 'Installing Gitbook CLI'
|
||||||
@ -25,8 +24,8 @@ for D in *; do
|
|||||||
|
|
||||||
# Clear previous output, generate new
|
# Clear previous output, generate new
|
||||||
rm -rf _book
|
rm -rf _book
|
||||||
gitbook install
|
npx gitbook install
|
||||||
gitbook build
|
npx gitbook build
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ mkdir ./docs/latest/_book/demo/
|
|||||||
|
|
||||||
# Install build deps and all monorepo package dependencies. Yarn Workspaces
|
# Install build deps and all monorepo package dependencies. Yarn Workspaces
|
||||||
# should also symlink all projects appropriately
|
# should also symlink all projects appropriately
|
||||||
yarn install --no-ignore-optional --pure-lockfile
|
# yarn install --no-ignore-optional --pure-lockfile
|
||||||
|
|
||||||
# Navigate to our Viewer project
|
# Navigate to our Viewer project
|
||||||
cd ./platform/viewer/
|
cd ./platform/viewer/
|
||||||
@ -69,13 +68,13 @@ cd ./platform/viewer/
|
|||||||
# Create a Versions File
|
# Create a Versions File
|
||||||
node -p -e \"'export default \\'' + require('./package.json').version + '\\';'\" > src/version.js
|
node -p -e \"'export default \\'' + require('./package.json').version + '\\';'\" > src/version.js
|
||||||
# Copy over wado-image-loader codecs and worker file
|
# Copy over wado-image-loader codecs and worker file
|
||||||
npx cpx \"node_modules/cornerstone-wado-image-loader/dist/*.min.js*\" \"public\" -v
|
cp \"node_modules/cornerstone-wado-image-loader/dist/*.min.js*\" \"public\" -v
|
||||||
# Build using react-scripts
|
# Build using react-scripts
|
||||||
# npx cross-env PUBLIC_URL=/demo REACT_APP_CONFIG=config/netlify.js react-scripts --max_old_space_size=4096 build
|
# npx cross-env PUBLIC_URL=/demo REACT_APP_CONFIG=config/netlify.js react-scripts --max_old_space_size=4096 build
|
||||||
# Build using WebPack
|
# Build using WebPack
|
||||||
# TODO: consume public/config correctly instead of hardcode
|
# TODO: consume public/config correctly instead of hardcode
|
||||||
npx cross-env NODE_ENV=production webpack-dev-server --config config/webpack.prod.js --mode production -w -d
|
npx cross-env NODE_ENV=production webpack-dev-server --config config/webpack.prod.js --mode production -w -d
|
||||||
# Copy output to the folder that is our publish target
|
# Copy output to the folder that is our publish target
|
||||||
npx cpx 'dist/**/*' ./../../docs/latest/_book/demo --verbose
|
cp 'dist/**/*' ./../../docs/latest/_book/demo --verbose
|
||||||
|
|
||||||
echo 'Nothing left to see here. Go home, folks.'
|
echo 'Nothing left to see here. Go home, folks.'
|
||||||
|
|||||||
@ -18,9 +18,9 @@
|
|||||||
[build.environment]
|
[build.environment]
|
||||||
NODE_VERSION = "10.16.0"
|
NODE_VERSION = "10.16.0"
|
||||||
YARN_VERSION = "1.17.3"
|
YARN_VERSION = "1.17.3"
|
||||||
|
RUBY_VERSION = "2.6.2"
|
||||||
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
|
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
|
||||||
|
|
||||||
|
|
||||||
# Production context: all deploys from the Production branch set in your site's
|
# Production context: all deploys from the Production branch set in your site's
|
||||||
# deploy contexts will inherit these settings.
|
# deploy contexts will inherit these settings.
|
||||||
# [context.production]
|
# [context.production]
|
||||||
@ -33,7 +33,7 @@
|
|||||||
[context.deploy-preview]
|
[context.deploy-preview]
|
||||||
base = ""
|
base = ""
|
||||||
publish = "docs/latest/_book/"
|
publish = "docs/latest/_book/"
|
||||||
command = "chmod +x .netlify/build-deploy-preview.sh && .netlify/build-deploy-preview.sh"
|
command = "yarn config set workspaces-experimental true && chmod +x .netlify/build-deploy-preview.sh && .netlify/build-deploy-preview.sh"
|
||||||
|
|
||||||
# Redirects and headers are GLOBAL for all builds – they do not get scoped to
|
# Redirects and headers are GLOBAL for all builds – they do not get scoped to
|
||||||
# contexts no matter where you define them in the file.
|
# contexts no matter where you define them in the file.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user