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-preview
This commit is contained in:
Francisco Giordano
2019-12-02 19:13:13 -03:00
committed by GitHub
parent 0c644cc470
commit b56e00eb61
7 changed files with 2503 additions and 1156 deletions

View File

@ -7,15 +7,11 @@ const path = require('path');
const cp = require('child_process');
const match = require('micromatch');
function exec (cmd, ...args) {
cp.execFileSync(cmd, args, { stdio: 'inherit' });
}
function readJSON (path) {
return JSON.parse(fs.readFileSync(path));
}
exec('npm', 'run', 'compile');
cp.spawnSync('npm', ['run', 'compile'], { stdio: 'inherit' });
const pkgFiles = readJSON('package.json').files;