From 7c9dffc3e289968c3ac54ecced3b13c192db63cf Mon Sep 17 00:00:00 2001 From: Sune Broendum Woeller Date: Mon, 17 Sep 2018 10:54:43 +0200 Subject: [PATCH] Fix WARN [watcher]: Pattern "..../patterns/foo.js" does not match any file, by excluding all requirements ending with '-url', since they point to a folder and not to a .js file. The folder contents are already included by 'patterns/**/*'. --- mockup/js/grunt.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mockup/js/grunt.js b/mockup/js/grunt.js index 808a792ff..9005c5e6a 100644 --- a/mockup/js/grunt.js +++ b/mockup/js/grunt.js @@ -233,7 +233,12 @@ var path; for (var key in this.requirejsOptions.paths) { path = this.requirejsOptions.paths[key]; - if (path.indexOf('.md') !== path.length - 3) { + // Exclude .md files. + // Exclude all requirements ending with '-url', since they point + // to a folder and not to a .js file, to avoid warnings: + // WARN [watcher]: Pattern "..../patterns/filemanager.js" does not match any file. + // - we include 'patterns/**/*' below. + if (path.indexOf('.md') !== path.length - 3 && key.indexOf('-url') === -1) { this.files.push({ pattern: path + '.js', included: false }); } if (key.indexOf('mockup-patterns-') === 0) {