function watch(patterns, opts, cb) {
    if (typeof opts === "function") {
        cb = opts;
        opts = {};
    }

    var watcher = require("chokidar").watch(patterns, opts);

    if (_.isFunction(cb)) {
        watcher.on("all", cb);
    }

    // watcher.on('ready', () => {
    //     console.log(watcher.getWatched());
    // });

    return watcher;
}
@param patterns
@param opts
@param cb
@returns {*}