Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
preload task: error message when no module file could be found
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 committed Jan 12, 2015
1 parent 77d3f57 commit f6f18ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tasks/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ module.exports = function (grunt) {
var preloadOption = preloadOptions[preloadPattern];
var preloadFiles = grunt.file.match(preloadPattern + '/' + preloadInfo.indicatorFile, resourceFiles);

if (preloadFiles.length < 1) {
grunt.log.error('No "' + preloadInfo.indicatorFile + '" found for pattern "' + preloadPattern + '"');
return;
}

preloadFiles.forEach(function(preloadFile) {
var preloadDir = path.dirname(preloadFile);
var preloadModuleName = preloadDir + '/' + preloadInfo.moduleName;
Expand Down

0 comments on commit f6f18ae

Please sign in to comment.