@@ -59,8 +59,21 @@ function addManifest( packager ) {
59
59
function buildCDNPackage ( callback ) {
60
60
console . log ( "Building CDN package" ) ;
61
61
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-13" ) ;
63
+ var PackageOfThemes = require ( "download.jqueryui.com/lib/package-1-13-themes" ) ;
63
64
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
+
64
77
var jqueryUi = new JqueryUi ( path . resolve ( "." ) ) ;
65
78
var target = fs . createWriteStream ( "../" + jqueryUi . pkg . name + "-" + jqueryUi . pkg . version +
66
79
"-cdn.zip" ) ;
@@ -71,18 +84,22 @@ function buildCDNPackage( callback ) {
71
84
jqueryUi : jqueryUi ,
72
85
themeVars : null
73
86
} ) ;
74
- packager . ready . then ( function ( ) {
75
- removeExternals ( packager ) ;
76
- addManifest ( packager ) ;
77
- packager . toZip ( target , {
78
- basedir : ""
79
- } , function ( error ) {
80
- if ( error ) {
81
- Release . abort ( "Failed to zip CDN package" , error ) ;
82
- }
83
- callback ( ) ;
87
+ packager . ready
88
+ . then ( function ( ) {
89
+ removeExternals ( packager ) ;
90
+ addManifest ( packager ) ;
91
+ packager . toZip ( target , {
92
+ basedir : ""
93
+ } , function ( error ) {
94
+ if ( error ) {
95
+ Release . abort ( "Failed to zip the CDN package" , error ) ;
96
+ }
97
+ callback ( ) ;
98
+ } ) ;
99
+ } )
100
+ . catch ( function ( error ) {
101
+ Release . abort ( "Failed to create the CDN package" , error ) ;
84
102
} ) ;
85
- } ) ;
86
103
}
87
104
88
105
Release . define ( {
@@ -123,7 +140,7 @@ Release.define( {
123
140
} ;
124
141
125
142
module . exports . dependencies = [
126
- "download.jqueryui.com@2.1.2 " ,
143
+ "download.jqueryui.com@2.2.1 " ,
127
144
"node-packager@0.0.6" ,
128
- "shelljs@0.2.6 "
145
+ "shelljs@0.8.4 "
129
146
] ;
0 commit comments