@@ -175,9 +175,10 @@ grunt.registerMultiTask( "md5", "Create list of md5 hashes for CDN uploads", fun
175
175
} ) ;
176
176
177
177
grunt . registerTask ( "generate_themes" , function ( ) {
178
- var download , files , done ,
178
+ var download , files , done , configContent ,
179
179
target = "dist/" + grunt . template . process ( grunt . config ( "files.themes" ) , grunt . config ( ) ) + "/" ,
180
- distFolder = "dist/" + grunt . template . process ( grunt . config ( "files.dist" ) , grunt . config ( ) ) ;
180
+ distFolder = "dist/" + grunt . template . process ( grunt . config ( "files.dist" ) , grunt . config ( ) ) ,
181
+ configFile = "node_modules/download.jqueryui.com/config.json" ;
181
182
try {
182
183
require . resolve ( "download.jqueryui.com" ) ;
183
184
} catch ( error ) {
@@ -186,8 +187,12 @@ grunt.registerTask( "generate_themes", function() {
186
187
187
188
// copy release files into download builder to avoid cloning again
188
189
grunt . file . expandFiles ( distFolder + "/**" ) . forEach ( function ( file ) {
189
- grunt . file . copy ( file , "node_modules/download.jqueryui.com/release/" + file . replace ( / ^ d i s t / , "" ) ) ;
190
+ grunt . file . copy ( file , "node_modules/download.jqueryui.com/release/" + file . replace ( / ^ d i s t \/ j q u e r y - u i - / , "" ) ) ;
190
191
} ) ;
192
+ // make it look for the right version
193
+ configContent = grunt . file . readJSON ( configFile ) ;
194
+ configContent . jqueryUi . stable . version = grunt . config ( "pkg.version" ) ;
195
+ grunt . file . write ( configFile , JSON . stringify ( configContent , null , "\t" ) + "\n" ) ;
191
196
192
197
download = new ( require ( "download.jqueryui.com" ) ) ( ) ;
193
198
0 commit comments