项目作者: myTerminal

项目描述 :
A wrapper over gulp-watch with added features
高级语言: JavaScript
项目地址: git://github.com/myTerminal/gulp-watch-now.git
创建时间: 2017-06-20T00:23:23Z
项目社区:https://github.com/myTerminal/gulp-watch-now

开源协议:MIT License

下载


gulp-watch-now

npm version
npm downloads
License
Build Status
Code Climate
js-myterminal-style
Coverage Status
NPM

A wrapper around gulp-watch with added features

Note: Not compatible with Gulp 4!

Installation

gulp-watch-now is available on Npm. You can add it to your Node.js project with a simple command.

  1. npm install gulp-watch-now

How to Use

‘Require’ gulp-watch-now into a variable and use it almost as you would use gulp-watch, passing in an array of files to watch and an array of tasks to run for changes in those files. You just have to pass the instance of gulp as the first parameter.

  1. gulp.task('develop', function () {
  2. gulpWatchNow.watch(gulp, [
  3. 'src/index.js'
  4. ], [
  5. 'scripts-debug'
  6. ]);
  7. });

The only motivation to use an extra package (this) and not use the already-available gulp-watch is that unlike the latter, the former runs all the supplied tasks once first and then every time the files in the specified patterns are changed. The latter only does it on file changes.