How to use watch.createMonitor:
GitHub: wavesjs/waves-audio
95 96 97 98 99 100 101 102 103 104
* Watch javascript source files. */ function watchFiles(srcDirectory, distDirectory) { var transpiler = javascripts.getTranspiler(srcDirectory, distDirectory, isAllowed, babelOptions, browserifyOptions); watch.createMonitor(srcDirectory, watchOptions, function(monitor) { monitor.on('created', function(filename, stats) { if (isAllowed(filename)) transpiler.transpile(filename, []); });
7
52
10
See more examples