Skip to content

Commit d82ea60

Browse files
authored
Build: Fix package generation
jQuery UI 1.12.1 was released using an outdated (at the time of its release) version of the download.jqueryui.com package; the latest ones wouldn't generate relevant JS files. This commit accounts for the changes so that the latest version can be used. Closes gh-1965
1 parent cf938e2 commit d82ea60

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

build/release.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,21 @@ function addManifest( packager ) {
5959
function buildCDNPackage( callback ) {
6060
console.log( "Building CDN package" );
6161
var JqueryUi = require( "download.jqueryui.com/lib/jquery-ui" );
62-
var Package = require( "download.jqueryui.com/lib/package-1-12-themes" );
62+
var PackageWithoutThemes = require( "download.jqueryui.com/lib/package-1-12" );
63+
var PackageOfThemes = require( "download.jqueryui.com/lib/package-1-12-themes" );
6364
var Packager = require( "node-packager" );
65+
66+
// PackageOfThemes doesn't contain JS files, PackageWithoutThemes doesn't contain themes;
67+
// we need both.
68+
function Package() {
69+
70+
// PackageOfThemes invokes PackageWithoutThemes's constructor in its own so we don't
71+
// need to do it by ourselves; we just need to handle prototypes that way.
72+
PackageOfThemes.apply( this, arguments );
73+
}
74+
75+
Object.assign( Package.prototype, PackageWithoutThemes.prototype, PackageOfThemes.prototype );
76+
6477
var jqueryUi = new JqueryUi( path.resolve( "." ) );
6578
var target = fs.createWriteStream( "../" + jqueryUi.pkg.name + "-" + jqueryUi.pkg.version +
6679
"-cdn.zip" );

0 commit comments

Comments
 (0)