]> source.dussan.org Git - jquery-ui.git/commitdiff
Build: Style fixes 1469/head
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 6 Mar 2015 15:35:10 +0000 (16:35 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 6 Mar 2015 15:35:10 +0000 (16:35 +0100)
build/release.js
build/tasks/build.js
build/tasks/testswarm.js

index a55f8002c79a53b2bce2f4745a638545c89b47c4..ce1425bb095c4b866eb6b1066b0cfa2fa60d1387 100644 (file)
@@ -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 );
-               });
+               } );
        }
-});
+} );
 
 };
 
index 13e6fad14b043dfbf8a3a560ded8ce04f7d787fd..77ae2545daf16d89a653c65b7674b57af4206f9e 100644 (file)
@@ -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;
-});
+} );
 
 };
index 5f872e9017ce93e9d0516ef3c2e4eb2374f15554..73817abfa6afede040877192904e40c74028e544 100644 (file)
@@ -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() );
-});
+} );
 
 };