]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add gulp watch task for docs (#5724)
authorWei-Wei Wu <wuxx1045@umn.edu>
Sun, 9 Sep 2018 18:42:18 +0000 (11:42 -0700)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Sun, 9 Sep 2018 18:42:18 +0000 (20:42 +0200)
gulp docs --watch

docs/developers/contributing.md
gulpfile.js

index fa3511bb09a2cbdc940bfe197dd2804cc5c1dbff..551ac71ca975df80d2ca6a1822ba740cbc64aa2b 100644 (file)
@@ -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).
index 24c01665ae416a7e211a6e12bc0451f7247f3f81..f6795fa7f56201340ad4f58934dd3e8569d6af32 100644 (file)
@@ -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(() => {