Skip to content

Commit b5f1ffd

Browse files
committed
Build: Remove manifest files; move metadata to source files
Closes jquerygh-1379
1 parent 347b2a5 commit b5f1ffd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+262
-426
lines changed

build/core.json

Lines changed: 0 additions & 68 deletions
This file was deleted.

build/effect.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

build/interaction.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

build/release.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ Release.define({
6565
"}</script>\n\nReleased on " + monthNames[ now.getMonth() ] + " " + now.getDate() + ", " + now.getFullYear() + "\n\n";
6666
},
6767
generateArtifacts: function( fn ) {
68-
var files;
69-
function copyCdnFiles() {
68+
var files = replaceAtVersion();
69+
70+
buildCDNPackage(function copyCdnFiles() {
7071
var zipFile = shell.ls( "../jquery*-cdn.zip" )[ 0 ],
7172
tmpFolder = "../tmp-zip-output",
7273
unzipCommand = "unzip -o " + zipFile + " -d " + tmpFolder;
@@ -82,11 +83,7 @@ Release.define({
8283
shell.cp( tmpFolder + "/jquery-ui*.js", "dist/cdn" );
8384
shell.cp( "-r", tmpFolder + "/themes", "dist/cdn" );
8485
fn( files );
85-
}
86-
87-
Release.exec( "grunt manifest" );
88-
files = shell.ls( "*.jquery.json" ).concat( replaceAtVersion() );
89-
buildCDNPackage( copyCdnFiles );
86+
});
9087
}
9188
});
9289

build/tasks/build.js

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -2,98 +2,6 @@ module.exports = function( grunt ) {
22

33
"use strict";
44

5-
grunt.registerTask( "manifest", "Generate jquery.json manifest files", function() {
6-
var uiFiles,
7-
totalManifests = 0,
8-
pkg = grunt.config( "pkg" ),
9-
base = {
10-
core: {
11-
name: "ui.{plugin}",
12-
title: "jQuery UI {Plugin}"
13-
},
14-
widget: {
15-
name: "ui.{plugin}",
16-
title: "jQuery UI {Plugin}",
17-
dependencies: [ "core", "widget" ]
18-
},
19-
interaction: {
20-
name: "ui.{plugin}",
21-
title: "jQuery UI {Plugin}",
22-
dependencies: [ "core", "widget", "mouse" ]
23-
},
24-
effect: {
25-
name: "ui.effect-{plugin}",
26-
title: "jQuery UI {Plugin} Effect",
27-
keywords: [ "effect", "show", "hide" ],
28-
homepage: "http://jqueryui.com/effect/",
29-
demo: "http://jqueryui.com/effect/",
30-
docs: "http://api.jqueryui.com/{plugin}-effect/",
31-
dependencies: [ "effect" ]
32-
}
33-
};
34-
35-
Object.keys( base ).forEach(function( type ) {
36-
var baseManifest = base[ type ],
37-
plugins = grunt.file.readJSON( "build/" + type + ".json" ),
38-
bower = grunt.file.readJSON( "bower.json" );
39-
40-
Object.keys( plugins ).forEach(function( plugin ) {
41-
var manifest, bowerKey,
42-
data = plugins[ plugin ],
43-
name = plugin.charAt( 0 ).toUpperCase() + plugin.substr( 1 );
44-
45-
function replace( str ) {
46-
return str.replace( "{plugin}", plugin ).replace( "{Plugin}", name );
47-
}
48-
49-
manifest = {
50-
name: data.name || replace( baseManifest.name ),
51-
title: data.title || replace( baseManifest.title ),
52-
description: data.description,
53-
keywords: [ "ui", plugin ]
54-
.concat( baseManifest.keywords || [] )
55-
.concat( data.keywords || [] ),
56-
version: pkg.version,
57-
author: pkg.author,
58-
maintainers: pkg.maintainers,
59-
licenses: pkg.licenses,
60-
bugs: pkg.bugs,
61-
homepage: data.homepage || replace( baseManifest.homepage ||
62-
"http://jqueryui.com/{plugin}/" ),
63-
demo: data.demo || replace( baseManifest.demo ||
64-
"http://jqueryui.com/{plugin}/" ),
65-
docs: data.docs || replace( baseManifest.docs ||
66-
"http://api.jqueryui.com/{plugin}/" ),
67-
download: "http://jqueryui.com/download/",
68-
dependencies: {},
69-
// custom
70-
category: data.category || type
71-
};
72-
73-
for ( bowerKey in bower.dependencies ) {
74-
manifest.dependencies[ bowerKey ] = bower.dependencies[ bowerKey ];
75-
}
76-
77-
(baseManifest.dependencies || [])
78-
.concat(data.dependencies || [])
79-
.forEach(function( dependency ) {
80-
manifest.dependencies[ "ui." + dependency ] = pkg.version;
81-
});
82-
83-
grunt.file.write( manifest.name + ".jquery.json",
84-
JSON.stringify( manifest, null, "\t" ) + "\n" );
85-
totalManifests += 1;
86-
});
87-
});
88-
89-
uiFiles = grunt.file.expand( "ui/*.js" ).length;
90-
if ( totalManifests !== uiFiles ) {
91-
grunt.log.error( "Generated " + totalManifests + " manifest files, but there are " +
92-
uiFiles + " ui/*.js files. Do all of them have entries?" );
93-
return false;
94-
}
95-
});
96-
975
grunt.registerTask( "clean", function() {
986
require( "rimraf" ).sync( "dist" );
997
});

build/widget.json

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)