UNPKG

liberry

Version:

liberry is a command utility to help you easily set up, develop, and host your own project pattern library.

26 lines (23 loc) 832 B
var _require = require("../../../_require"), build = require("./build"), gulp = require("gulp"), config = _require("./src/util/config/get"); module.exports = function() { var watchGlobs = config.liberry._watch.concat(config.project._watch); //exclude output location from being watched watchGlobs.push("!" + config.liberry._root + "/app/**"); var buildNumber = 0, building = false; gulp.watch(watchGlobs, function() { if (!building) { building = true; buildNumber += 1; console.log("Starting build " + buildNumber + "..."); build(); console.log("Build " + buildNumber + " finished."); setTimeout(function() { building = false; }, 500); } }); };