Commit c5c0e22c by Francisco Giordano

fix docsite build script

parent 7552af95
[build] [build]
command = "npm run docsite build" command = "npm run docsite build"
publish = "docsite-build" publish = "openzeppelin-docs/build/site"
#!/usr/bin/env bash #!/usr/bin/env bash
# usage: npm run docsite if [ "$1" != "build" -a "$1" != "start" ];then
echo "usage: npm run docsite (build|start)" >&2
exit 1
fi
set -o errexit set -o errexit
...@@ -8,9 +11,16 @@ if [ ! -d openzeppelin-docs ]; then ...@@ -8,9 +11,16 @@ if [ ! -d openzeppelin-docs ]; then
git clone https://github.com/frangio/openzeppelin-docs.git git clone https://github.com/frangio/openzeppelin-docs.git
fi fi
git -C openzeppelin-docs pull git -C openzeppelin-docs pull -q
if [ "$1" = "build" ]; then
npm run prepare-docs
cd docs
env DISABLE_PREPARE_DOCS= node ../openzeppelin-docs/build-local.js
npx concurrently \ elif [ "$1" = "start" ]; then
'nodemon --delay 1 -e "*" -w contracts -w "docs/*.hbs" -x npm run prepare-docs' \ npx concurrently \
'cd docs; env DISABLE_PREPARE_DOCS= nodemon --delay 1 -e adoc,yml ../openzeppelin-docs/build-local.js' \ 'nodemon --delay 1 -e "*" -w contracts -w "docs/*.hbs" -x npm run prepare-docs' \
'http-server -c-1 openzeppelin-docs/build/site' 'cd docs; env DISABLE_PREPARE_DOCS= nodemon --delay 1 -e adoc,yml ../openzeppelin-docs/build-local.js' \
'http-server -c-1 openzeppelin-docs/build/site'
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment