diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2015-03-06 16:35:10 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2015-03-06 16:35:10 +0100 |
commit | ea999e4776bb0fe67b1eff702f09fc5cb878bfe0 (patch) | |
tree | 54e50796fb3b9a57bbee6d6a740340fd08f05c44 /build | |
parent | ac2a1113bbc179884b22070c36c64331a7c53218 (diff) | |
download | jquery-ui-ea999e4776bb0fe67b1eff702f09fc5cb878bfe0.tar.gz jquery-ui-ea999e4776bb0fe67b1eff702f09fc5cb878bfe0.zip |
Build: Style fixes
Diffstat (limited to 'build')
-rw-r--r-- | build/release.js | 22 | ||||
-rw-r--r-- | build/tasks/build.js | 10 | ||||
-rw-r--r-- | build/tasks/testswarm.js | 46 |
3 files changed, 39 insertions, 39 deletions
diff --git a/build/release.js b/build/release.js index a55f8002c..ce1425bb0 100644 --- a/build/release.js +++ b/build/release.js @@ -9,7 +9,7 @@ function replaceAtVersion() { var matches = []; function recurse( folder ) { - fs.readdirSync( folder ).forEach(function( fileName ) { + fs.readdirSync( folder ).forEach( function( fileName ) { var content, fullPath = folder + "/" + fileName; if ( fs.statSync( fullPath ).isDirectory() ) { @@ -18,13 +18,13 @@ function replaceAtVersion() { } content = fs.readFileSync( fullPath, { encoding: "utf-8" - }); + } ); if ( !/@VERSION/.test( content ) ) { return; } matches.push( fullPath ); fs.writeFileSync( fullPath, content.replace( /@VERSION/g, Release.newVersion ) ); - }); + } ); } [ "ui", "themes" ].forEach( recurse ); @@ -41,7 +41,7 @@ function buildCDNPackage( callback ) { builder = new downloadBuilder.Builder( jqueryUi, ":all:" ), packer = new downloadBuilder.ThemesPacker( builder, { includeJs: true - }), + } ), target = "../" + jqueryUi.pkg.name + "-" + jqueryUi.pkg.version + "-cdn.zip"; // Zip dir structure must be flat, override default base folder @@ -51,15 +51,15 @@ function buildCDNPackage( callback ) { Release.abort( "Failed to zip CDN package", error ); } callback(); - }); + } ); } -Release.define({ +Release.define( { issueTracker: "trac", contributorReportId: 22, changelogShell: function() { var monthNames = [ "January", "February", "March", "April", "May", "June", "July", - "August", "September", "October", "November", "December" ], + "August", "September", "October", "November", "December" ], now = new Date(); return "<script>{\n\t\"title\": \"jQuery UI " + Release.newVersion + " Changelog\"\n" + "}</script>\n\nReleased on " + monthNames[ now.getMonth() ] + " " + now.getDate() + ", " + now.getFullYear() + "\n\n"; @@ -67,14 +67,14 @@ Release.define({ generateArtifacts: function( fn ) { var files = replaceAtVersion(); - buildCDNPackage(function copyCdnFiles() { + buildCDNPackage( function copyCdnFiles() { var zipFile = shell.ls( "../jquery*-cdn.zip" )[ 0 ], tmpFolder = "../tmp-zip-output", unzipCommand = "unzip -o " + zipFile + " -d " + tmpFolder; console.log( "Unzipping for dist/cdn copies" ); shell.mkdir( "-p", tmpFolder ); - Release.exec({ + Release.exec( { command: unzipCommand, silent: true }, "Failed to unzip cdn files" ); @@ -83,9 +83,9 @@ Release.define({ shell.cp( tmpFolder + "/jquery-ui*.js", "dist/cdn" ); shell.cp( "-r", tmpFolder + "/themes", "dist/cdn" ); fn( files ); - }); + } ); } -}); +} ); }; diff --git a/build/tasks/build.js b/build/tasks/build.js index 13e6fad14..77ae2545d 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -4,12 +4,12 @@ module.exports = function( grunt ) { grunt.registerTask( "clean", function() { require( "rimraf" ).sync( "dist" ); -}); +} ); grunt.registerTask( "asciilint", function() { var valid = true, - files = grunt.file.expand({ filter: "isFile" }, "ui/*.js" ); - files.forEach(function( filename ) { + files = grunt.file.expand( { filter: "isFile" }, "ui/*.js" ); + files.forEach( function( filename ) { var i, c, text = grunt.file.read( filename ); @@ -32,11 +32,11 @@ grunt.registerTask( "asciilint", function() { } valid = false; } - }); + } ); if ( valid ) { grunt.log.ok( files.length + " files lint free." ); } return valid; -}); +} ); }; diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js index 5f872e901..73817abfa 100644 --- a/build/tasks/testswarm.js +++ b/build/tasks/testswarm.js @@ -48,26 +48,26 @@ function submit( commit, runs, configFile, extra, done ) { runs[ testName ] = config.testUrl + commit + "/tests/unit/" + runs[ testName ]; } - testswarm.createClient({ + testswarm.createClient( { url: config.swarmUrl - }) - .addReporter( testswarm.reporters.cli ) - .auth({ - id: config.authUsername, - token: config.authToken - }) - .addjob({ - name: "Commit <a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra, - runs: runs, - runMax: config.runMax, - browserSets: config.browserSets, - timeout: 1000 * 60 * 30 - }, function( error, passed ) { - if ( error ) { - grunt.log.error( error ); - } - done( passed ); - }); + } ) + .addReporter( testswarm.reporters.cli ) + .auth( { + id: config.authUsername, + token: config.authToken + } ) + .addjob( { + name: "Commit <a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra, + runs: runs, + runMax: config.runMax, + browserSets: config.browserSets, + timeout: 1000 * 60 * 30 + }, function( error, passed ) { + if ( error ) { + grunt.log.error( error ); + } + done( passed ); + } ); } grunt.registerTask( "testswarm", function( commit, configFile ) { @@ -77,16 +77,16 @@ grunt.registerTask( "testswarm", function( commit, configFile ) { latestTests[ test ] = tests[ test ] + "?nojshint=true"; } submit( commit, latestTests, configFile, "", this.async() ); -}); +} ); grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, minor ) { var allTests = {}; - versions[ minor ].split(" ").forEach(function( version ) { + versions[ minor ].split( " " ).forEach( function( version ) { for ( var test in tests ) { allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version; } - }); + } ); submit( commit, allTests, configFile, "core " + minor, this.async() ); -}); +} ); }; |