code: function watch(watchOptions) {
  
        var watcher = chokidar.watch(watchOptions.dirs, {
          ignoreInitial: true,
          ignored: /[/\\]\./
        });
  
        watcher.on('add', function(pathFile) {
          onWatcher(pathFile);
        });
  
        watcher.on('change', function(pathFile) {
          onWatcher(pathFile);
        });
  
        watcher.on('unlink', function(pathFile) {
          onWatcher(pathFile);
        });
  
        var updating = false;
        var queued = null;
  
        function onWatcher(pathFile) {
  
          if (updating) {
            queued = pathFile;
            return;
          }
  
          queued = null;
          updating = true;
  
          return Promise.resolve()
            .then(function() {
              return watchOptions.onFile(pathFile);
            })
            .then(function() {
              return Promise.delay(1000);
            })
            .then(function() {
              updating = false;
              if (queued) {
                return onWatcher(queued);
              }
            });
        }
      }
docs: ----------------------------------------------------------