aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2013-01-14 21:06:53 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2013-01-14 21:08:41 +0100
commitd403e5a50fade2eaf6508ac7cc050363f1006904 (patch)
tree1947ccb78cb82b814a2111f52196e9a2bdfe05af /build
parent176e0ed0e67f5a0f7a334d5d7b65638017a65349 (diff)
downloadjquery-ui-d403e5a50fade2eaf6508ac7cc050363f1006904.tar.gz
jquery-ui-d403e5a50fade2eaf6508ac7cc050363f1006904.zip
Build: Fix generate_themes task to adopt to changes in download builder.
Diffstat (limited to 'build')
-rw-r--r--build/tasks/build.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index 18e427a56..75cbca4a0 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -175,9 +175,10 @@ grunt.registerMultiTask( "md5", "Create list of md5 hashes for CDN uploads", fun
});
grunt.registerTask( "generate_themes", function() {
- var download, files, done,
+ var download, files, done, configContent,
target = "dist/" + grunt.template.process( grunt.config( "files.themes" ), grunt.config() ) + "/",
- distFolder = "dist/" + grunt.template.process( grunt.config( "files.dist" ), grunt.config() );
+ distFolder = "dist/" + grunt.template.process( grunt.config( "files.dist" ), grunt.config() ),
+ configFile = "node_modules/download.jqueryui.com/config.json";
try {
require.resolve( "download.jqueryui.com" );
} catch( error ) {
@@ -186,8 +187,12 @@ grunt.registerTask( "generate_themes", function() {
// copy release files into download builder to avoid cloning again
grunt.file.expandFiles( distFolder + "/**" ).forEach(function( file ) {
- grunt.file.copy( file, "node_modules/download.jqueryui.com/release/" + file.replace(/^dist/, "") );
+ grunt.file.copy( file, "node_modules/download.jqueryui.com/release/" + file.replace(/^dist\/jquery-ui-/, "") );
});
+ // make it look for the right version
+ configContent = grunt.file.readJSON( configFile );
+ configContent.jqueryUi.stable.version = grunt.config( "pkg.version" );
+ grunt.file.write( configFile, JSON.stringify( configContent, null, "\t" ) + "\n" );
download = new ( require( "download.jqueryui.com" ) )();