aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2021-08-04 17:29:48 +0200
committerGitHub <noreply@github.com>2021-08-04 17:29:48 +0200
commitd82ea60d05293660d820f1aafdbf45b6faefd9ff (patch)
tree42f124af62cbdc9a43d66235121c038b72e5e570
parentcf938e286382cc8f6cb74b3c6f75275073672aeb (diff)
downloadjquery-ui-d82ea60d05293660d820f1aafdbf45b6faefd9ff.tar.gz
jquery-ui-d82ea60d05293660d820f1aafdbf45b6faefd9ff.zip
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
-rw-r--r--build/release.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/build/release.js b/build/release.js
index 72d607128..0d70634d8 100644
--- a/build/release.js
+++ b/build/release.js
@@ -59,8 +59,21 @@ function addManifest( packager ) {
function buildCDNPackage( callback ) {
console.log( "Building CDN package" );
var JqueryUi = require( "download.jqueryui.com/lib/jquery-ui" );
- var Package = require( "download.jqueryui.com/lib/package-1-12-themes" );
+ var PackageWithoutThemes = require( "download.jqueryui.com/lib/package-1-12" );
+ var PackageOfThemes = require( "download.jqueryui.com/lib/package-1-12-themes" );
var Packager = require( "node-packager" );
+
+ // PackageOfThemes doesn't contain JS files, PackageWithoutThemes doesn't contain themes;
+ // we need both.
+ function Package() {
+
+ // PackageOfThemes invokes PackageWithoutThemes's constructor in its own so we don't
+ // need to do it by ourselves; we just need to handle prototypes that way.
+ PackageOfThemes.apply( this, arguments );
+ }
+
+ Object.assign( Package.prototype, PackageWithoutThemes.prototype, PackageOfThemes.prototype );
+
var jqueryUi = new JqueryUi( path.resolve( "." ) );
var target = fs.createWriteStream( "../" + jqueryUi.pkg.name + "-" + jqueryUi.pkg.version +
"-cdn.zip" );