diff --git a/tools/compiler.js b/tools/compiler.js index 5b16a1e306..bee0a0a49b 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -236,6 +236,9 @@ var lintUnibuild = function (options) { }); }); + // bail out early if there is not much to run + if (! allLinters.length) { return; } + var watchSet = new watch.WatchSet; var sourceItems = inputSourceArch.getSourcesFunc(sourceExtensions, watchSet); var wrappedSourceItems = _.map(sourceItems, function (source) { diff --git a/tools/package-source.js b/tools/package-source.js index 5cc6b1c615..2691a9f00e 100644 --- a/tools/package-source.js +++ b/tools/package-source.js @@ -1173,7 +1173,7 @@ _.extend(PackageSource.prototype, { sourceArch.watchSet.merge(projectWatchSet); // Determine source files - sourceArch.getSourcesFunc = function (extensions, watchSet) { + sourceArch.getSourcesFunc = _.once(function (extensions, watchSet) { var sourceInclude = _.map( extensions, function (isTemplate, ext) { @@ -1341,7 +1341,7 @@ _.extend(PackageSource.prototype, { } return sources; - }; + }); }); if (! self._checkCrossUnibuildVersionConstraints()) {