From: Wei-Wei Wu Date: Sun, 9 Sep 2018 18:42:18 +0000 (-0700) Subject: Add gulp watch task for docs (#5724) X-Git-Tag: v2.7.3~1^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1aa54b074bda2f07a315b26d738bd90f617bd278;p=thirdparty%2FChart.js.git Add gulp watch task for docs (#5724) gulp docs --watch --- diff --git a/docs/developers/contributing.md b/docs/developers/contributing.md index fa3511bb0..551ac71ca 100644 --- a/docs/developers/contributing.md +++ b/docs/developers/contributing.md @@ -37,6 +37,7 @@ The following commands are now available from the repository root: > gulp lint // perform code linting (ESLint) > gulp test // perform code linting and run unit tests > gulp docs // build the documentation in ./dist/docs +> gulp docs --watch // starts the gitbook live reloaded server ``` More information can be found in [gulpfile.js](https://github.com/chartjs/Chart.js/blob/master/gulpfile.js). diff --git a/gulpfile.js b/gulpfile.js index 24c01665a..f6795fa7f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -190,7 +190,7 @@ function docsTask(done) { const cmd = process.execPath; exec([cmd, script, 'install', './'].join(' ')).then(() => { - return exec([cmd, script, 'build', './', './dist/docs'].join(' ')); + return exec([cmd, script, argv.watch ? 'serve' : 'build', './', './dist/docs'].join(' ')); }).catch((err) => { console.error(err.stdout); }).then(() => {