mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Build: Validate number of generated manifests
Closes gh-1241
This commit is contained in:
parent
0645ac45ed
commit
5bbf276205
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user