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() ) {
}
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 );
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
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";
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" );
shell.cp( tmpFolder + "/jquery-ui*.js", "dist/cdn" );
shell.cp( "-r", tmpFolder + "/themes", "dist/cdn" );
fn( files );
- });
+ } );
}
-});
+} );
};
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 );
}
valid = false;
}
- });
+ } );
if ( valid ) {
grunt.log.ok( files.length + " files lint free." );
}
return valid;
-});
+} );
};
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 ) {
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() );
-});
+} );
};