Fix documentation previews in pull requests (#2015)
* migrate to openzeppelin-docs-preview script * update netlify configuration * update docs-preview-script dependency * remove old docs directory from gitignore * update oz-docs script for live reload * update oz-docs scripts to latest * replace child_process.execFileSync with spawnSync * update oz-docs-previewpull/2020/head
parent
0c644cc470
commit
b56e00eb61
@ -1,3 +1,3 @@ |
||||
[build] |
||||
command = "npm run docs build" |
||||
publish = "openzeppelin-docs/build/site" |
||||
command = "npm run docs" |
||||
publish = "build/site" |
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
if [ "$1" != "build" -a "$1" != "start" ];then |
||||
echo "usage: npm run docs (build|start)" >&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
set -o errexit |
||||
|
||||
if [ ! -d openzeppelin-docs ]; then |
||||
git clone https://github.com/frangio/openzeppelin-docs.git openzeppelin-docs |
||||
fi |
||||
|
||||
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 |
||||
|
||||
elif [ "$1" = "start" ]; then |
||||
npx concurrently \ |
||||
'nodemon --delay 1 -e "*" -w contracts -w "docs/*.hbs" -x npm run prepare-docs' \ |
||||
'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 |
Loading…
Reference in new issue