aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2014-05-08 20:57:19 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2014-05-09 18:07:20 +0200
commit5bbf27620504ec92cbeb3a907535f100b8d9586f (patch)
tree09cee3af8bc4f09410804f95e2f122c6f0394fe9 /build
parent0645ac45edc383ae30f17ce9e21a92d934ea5931 (diff)
downloadjquery-ui-5bbf27620504ec92cbeb3a907535f100b8d9586f.tar.gz
jquery-ui-5bbf27620504ec92cbeb3a907535f100b8d9586f.zip
Build: Validate number of generated manifests
Closes gh-1241
Diffstat (limited to 'build')
-rw-r--r--build/tasks/build.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index 3d399884e..ca8eca9bf 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -3,7 +3,9 @@ module.exports = function( grunt ) {
"use strict";
grunt.registerTask( "manifest", "Generate jquery.json manifest files", function() {
- var pkg = grunt.config( "pkg" ),
+ var uiFiles,
+ totalManifests = 0,
+ pkg = grunt.config( "pkg" ),
base = {
core: {
name: "ui.{plugin}",
@@ -76,8 +78,16 @@ grunt.registerTask( "manifest", "Generate jquery.json manifest files", function(
grunt.file.write( manifest.name + ".jquery.json",
JSON.stringify( manifest, null, "\t" ) + "\n" );
+ totalManifests += 1;
});
});
+
+ uiFiles = grunt.file.expand( "ui/*.js" ).length;
+ if ( totalManifests !== uiFiles ) {
+ grunt.log.error( "Generated " + totalManifests + " manifest files, but there are " +
+ uiFiles + " ui/*.js files. Do all of them have entries?" );
+ return false;
+ }
});
grunt.registerTask( "clean", function() {