diff options
author | Felix Nagel <info@felixnagel.com> | 2012-10-03 22:37:03 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-10-03 22:37:03 +0200 |
commit | cca4e77a95eb7024c204f4d0719baa2ef6195ed2 (patch) | |
tree | 732a8e171647d9b25b1b2988f09dccc5d182bad7 /build | |
parent | 5e12c54be1813e1f627d3214c11d7520fb46c647 (diff) | |
parent | e8bdf468614e59309b4a02ad4f6c29c1d06083c1 (diff) | |
download | jquery-ui-cca4e77a95eb7024c204f4d0719baa2ef6195ed2.tar.gz jquery-ui-cca4e77a95eb7024c204f4d0719baa2ef6195ed2.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'build')
-rw-r--r-- | build/core.json | 3 | ||||
-rw-r--r-- | build/release/changelog-shell | 66 | ||||
-rw-r--r-- | build/release/release.js | 14 | ||||
-rw-r--r-- | build/tasks/build.js | 129 | ||||
-rw-r--r-- | build/tasks/testswarm.js | 7 |
5 files changed, 98 insertions, 121 deletions
diff --git a/build/core.json b/build/core.json index deeb2e118..a9cac173a 100644 --- a/build/core.json +++ b/build/core.json @@ -62,6 +62,7 @@ "abstraction", "state", "factory" - ] + ], + "docs": "http://api.jqueryui.com/jQuery.widget/" } } diff --git a/build/release/changelog-shell b/build/release/changelog-shell index 9e4fbd7e4..9c9df9350 100644 --- a/build/release/changelog-shell +++ b/build/release/changelog-shell @@ -10,70 +10,68 @@ Move all commit notes to the appropriate section. - If there is no ticket number, search Trac for the relevant ticket. - If there is no ticket, create one (if needed), or leave just the commit link. -Double check that "XXXX" does not appear anywhere in the changelog. +Double check that "TICKETREF" does not appear anywhere in the changelog. -Post this changelog at: CHANGELOG_URL +Add this changelog to jqueryui.com. DELETE EVERYTHING ABOVE THE FOLLOWING LINE ------------------------------------------ +<script>{ + "title": "{title}" +}</script> -= Summary = -This is the final release of jQuery UI 1.8. --- OR -- -This is the second maintenance release for [[UI/Changelog/1.8|jQuery UI 1.8]]. +## Build -= Build = +## Core & Utilities -= Core & Utilities = +### UI Core -=== UI Core === +### Mouse -=== Mouse === +### Widget Factory -=== Widget Factory === +### Position -=== Position === +## Interactions -= Interactions = +### Draggable -=== Draggable === +### Droppable -=== Droppable === +### Resizable -=== Resizable === +### Selectable -=== Selectable === +### Sortable -=== Sortable === +## Widgets -= Widgets = +### Accordion -=== Accordion === +### Autocomplete -=== Autocomplete === +### Button -=== Button === +### Datepicker -=== Datepicker === +### Dialog -=== Dialog === +### Progressbar -=== Progressbar === +### Slider -=== Slider === +### Tabs -=== Tabs === +## Effects -= Effects = +### Individual effects -=== Individual effects === +## CSS Framework -= CSS Framework = +## Demos -= Demos = +## Website -= Website = - -=== Download Builder === +### Download Builder diff --git a/build/release/release.js b/build/release/release.js index 401f2366e..9a0f9a9e7 100644 --- a/build/release/release.js +++ b/build/release/release.js @@ -64,6 +64,9 @@ function cloneRepo() { if ( exec( "npm install" ).code !== 0 ) { abort( "Error installing dependencies." ); } + if ( exec( "npm install download.jqueryui.com" ).code !== 0 ) { + abort( "Error installing dependencies." ); + } echo(); } @@ -103,10 +106,12 @@ function getVersions() { major = parseInt( parts[ 0 ], 10 ); minor = parseInt( parts[ 1 ], 10 ); patch = parseInt( parts[ 2 ], 10 ); + // TODO: handle 2.0.0 if ( minor === 0 ) { abort( "This script is not smart enough to handle the 2.0.0 release." ); } + prevVersion = patch === 0 ? [ major, minor - 1, 0 ].join( "." ) : [ major, minor, patch - 1 ].join( "." ); @@ -143,8 +148,7 @@ function buildRelease() { echo(); echo( "Building release..." ); - // TODO: Build themes - if ( exec( "grunt release" ).code !== 0 ) { + if ( exec( "grunt release_cdn" ).code !== 0 ) { abort( "Error building release." ); } echo(); @@ -190,7 +194,9 @@ function generateChangelog() { var commits, changelogPath = baseDir + "/changelog", changelog = cat( "build/release/changelog-shell" ) + "\n", - fullFormat = "* %s (TICKETREF, [http://github.com/jquery/jquery-ui/commit/%H %h])"; + fullFormat = "* %s (TICKETREF, [%h](http://github.com/jquery/jquery-ui/commit/%H))"; + + changelog = changelog.replace( "{title}", "jQuery UI " + newVersion + " Changelog" ); echo ( "Adding commits..." ); commits = gitLog( fullFormat ); @@ -205,7 +211,7 @@ function generateChangelog() { }); return tickets.length ? commit.replace( "TICKETREF", tickets.map(function( ticket ) { - return "[http://bugs.jqueryui.com/ticket/" + ticket + " #" + ticket + "]"; + return "[#" + ticket + "](http://bugs.jqueryui.com/ticket/" + ticket + ")"; }).join( ", " ) ) : // Leave TICKETREF token in place so it's easy to find commits without tickets commit; diff --git a/build/tasks/build.js b/build/tasks/build.js index bbe63da2c..2f191b69a 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -171,97 +171,68 @@ grunt.registerMultiTask( "md5", "Create list of md5 hashes for CDN uploads", fun grunt.log.writeln( "Wrote " + this.file.dest + " with " + hashes.length + " hashes" ); }); -// only needed for 1.8 -grunt.registerTask( "download_docs", function() { - function capitalize(value) { - return value[0].toUpperCase() + value.slice(1); +grunt.registerTask( "generate_themes", function() { + var download, files, done, + target = "dist/" + grunt.template.process( grunt.config( "files.themes" ), grunt.config() ) + "/", + distFolder = "dist/" + grunt.template.process( grunt.config( "files.dist" ), grunt.config() ); + try { + require.resolve( "download.jqueryui.com" ); + } catch( e ) { + throw "You need to manually install download.jqueryui.com for this task to work"; } - // should be grunt.config("pkg.version")? - var version = "1.8", - docsDir = "dist/docs", - files = "draggable droppable resizable selectable sortable accordion autocomplete button datepicker dialog progressbar slider tabs position" - .split(" ").map(function(widget) { - return { - url: "http://docs.jquery.com/action/render/UI/API/" + version + "/" + capitalize(widget), - dest: docsDir + '/' + widget + '.html' - }; - }); - files = files.concat("animate addClass effect hide removeClass show switchClass toggle toggleClass".split(" ").map(function(widget) { - return { - url: "http://docs.jquery.com/action/render/UI/Effects/" + widget, - dest: docsDir + '/' + widget + '.html' - }; - })); - files = files.concat("Blind Clip Drop Explode Fade Fold Puff Slide Scale Bounce Highlight Pulsate Shake Size Transfer".split(" ").map(function(widget) { - return { - url: "http://docs.jquery.com/action/render/UI/Effects/" + widget, - dest: docsDir + '/effect-' + widget.toLowerCase() + '.html' - }; - })); - grunt.file.mkdir( "dist/docs" ); - grunt.utils.async.forEach( files, function( file, done ) { - var out = fs.createWriteStream( file.dest ); - out.on( "close", done ); - request( file.url ).pipe( out ); - }, this.async() ); -}); -grunt.registerTask( "download_themes", function() { - // var AdmZip = require('adm-zip'); - var done = this.async(), - themes = grunt.file.read( "build/themes" ).split(","), - requests = 0; - grunt.file.mkdir( "dist/tmp" ); - themes.forEach(function( theme, index ) { - requests += 1; - grunt.file.mkdir( "dist/tmp/" + index ); - var zipFileName = "dist/tmp/" + index + ".zip", - out = fs.createWriteStream( zipFileName ); - out.on( "close", function() { - grunt.log.writeln( "done downloading " + zipFileName ); - // TODO AdmZip produces "crc32 checksum failed", need to figure out why - // var zip = new AdmZip(zipFileName); - // zip.extractAllTo('dist/tmp/' + index + '/'); - // until then, using cli unzip... - grunt.utils.spawn({ - cmd: "unzip", - args: [ "-d", "dist/tmp/" + index, zipFileName ] - }, function( err, result ) { - grunt.log.writeln( "Unzipped " + zipFileName + ", deleting it now" ); - fs.unlinkSync( zipFileName ); - requests -= 1; - if (requests === 0) { - done(); - } - }); - }); - request( "http://ui-dev.jquery.com/download/?" + theme ).pipe( out ); + // 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.registerTask( "copy_themes", function() { - // each package includes the base theme, ignore that - var filter = /themes\/base/, - files = grunt.file.expandFiles( "dist/tmp/*/development-bundle/themes/**/*" ).filter(function( fileĀ ) { - return !filter.test( file ); - }), - // TODO the grunt.template.process call shouldn't be necessary - target = "dist/" + grunt.template.process( grunt.config( "files.themes" ), grunt.config() ) + "/", - distFolder = "dist/" + grunt.template.process( grunt.config( "files.dist" ), grunt.config() ); - files.forEach(function( fileName ) { - var targetFile = fileName.replace( /dist\/tmp\/\d+\/development-bundle\//, "" ).replace( "jquery-ui-.custom", "jquery-ui" ); - grunt.file.copy( fileName, target + targetFile ); - }); + download = new ( require( "download.jqueryui.com" ) )(); - // copy minified base theme from regular release files = grunt.file.expandFiles( distFolder + "/themes/base/**/*" ); files.forEach(function( fileName ) { grunt.file.copy( fileName, target + fileName.replace( distFolder, "" ) ); }); + + done = this.async(); + grunt.utils.async.forEach( download.themeroller.gallery(), function( theme, done ) { + var folderName = theme.folderName(), + concatTarget = "css-" + folderName, + cssContent = theme.css(), + cssFolderName = target + "themes/" + folderName + "/", + cssFileName = cssFolderName + "jquery.ui.theme.css", + cssFiles = grunt.config.get( "concat.css.src" )[ 1 ].slice(); + + grunt.file.write( cssFileName, cssContent ); + + // get css components, replace the last file with the current theme + cssFiles.splice(-1); + cssFiles.push( "<strip_all_banners:" + cssFileName + ">" ); + grunt.config.get( "concat" )[ concatTarget ] = { + src: [ "<banner:meta.bannerCSS>", cssFiles ], + dest: cssFolderName + "jquery-ui.css" + }; + grunt.task.run( "concat:" + concatTarget ); + + theme.fetchImages(function( err, files ) { + if ( err ) { + done( err ); + return; + } + files.forEach(function( file ) { + grunt.file.write( cssFolderName + "images/" + file.path, file.data ); + }); + done(); + }); + }, function( err ) { + if ( err ) { + grunt.log.error( err ); + } + done( !err ); + }); }); grunt.registerTask( "clean", function() { require( "rimraf" ).sync( "dist" ); }); -};
\ No newline at end of file +}; diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js index 46f152e7f..34c17d4f6 100644 --- a/build/tasks/testswarm.js +++ b/build/tasks/testswarm.js @@ -3,7 +3,7 @@ module.exports = function( grunt ) { var versions = { "git": "git", - "1.8": "1.8.0", + "1.8": "1.8.0 1.8.1 1.8.2", "1.7": "1.7 1.7.1 1.7.2", "1.6": "1.6 1.6.1 1.6.2 1.6.3 1.6.4" }, @@ -42,6 +42,7 @@ function submit( commit, tests, configFile, version, done ) { for ( test in tests ) { testUrls.push( testBase + tests[ test ] ); } + version = version ? ( version + " " ) : ""; testswarm({ url: config.swarmUrl, pollInterval: 10000, @@ -50,7 +51,7 @@ function submit( commit, tests, configFile, version, done ) { }, { authUsername: config.authUsername, authToken: config.authToken, - jobName: 'jQuery UI ' + version + '<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 7 ) + '</a>', + jobName: 'jQuery UI ' + version + '#<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>', runMax: config.runMax, "runNames[]": Object.keys(tests), "runUrls[]": testUrls, @@ -74,7 +75,7 @@ grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, mino allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version; } }); - submit( commit, allTests, configFile, minor + " core ", this.async() ); + submit( commit, allTests, configFile, minor + " core", this.async() ); }); }; |