code: function beginWatch() {
      let watchPaths = []
      let outputs = []
  
      util.each(cfgArr, function(config) {
        outputs = outputs.concat(config.output)
        watchPaths = watchPaths.concat(config.files)
        watchPaths = watchPaths.concat(config.libPaths)
      })
  
      chokidar
        .watch(watchPaths, {
          persistent: true,
          ignored: outputs,
          ignoreInitial: true,
          followSymlinks: true,
          usePolling: true,
          alwaysStat: false,
          interval: 100,
          atomic: true,
          ignorePermissionErrors: false
        })
        .on('change', function() {
          i = 0
          build(cfgArr[i], true)
        })
    }
docs: /* Watching files with multiple tasks, the log will be mixed together.
  That's why we need to extract another watch code here.