diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2014-07-17 10:25:59 -0700 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2014-07-17 11:08:37 -0700 |
commit | 91e06e9aebecf67a5c4997408bf0a28fffd03f9d (patch) | |
tree | 2542fcea18d695dec17642b89ff0beb9dcc3f330 /build | |
parent | 511eb1540bba2fbd45b6399c60ca361f11e572df (diff) | |
download | jquery-91e06e9aebecf67a5c4997408bf0a28fffd03f9d.tar.gz jquery-91e06e9aebecf67a5c4997408bf0a28fffd03f9d.zip |
Build: update grunt-jscs-checker and pass with the new rules
Conflicts:
build/tasks/build.js
src/ajax/xhr.js
src/attributes/classes.js
src/attributes/prop.js
src/attributes/val.js
src/core/init.js
src/core/ready.js
src/css.js
src/css/curCSS.js
src/css/defaultDisplay.js
src/data.js
src/data/var/dataPriv.js
src/data/var/dataUser.js
src/dimensions.js
src/effects.js
src/event.js
src/manipulation.js
src/offset.js
src/queue.js
src/selector-native.js
test/data/testrunner.js
Diffstat (limited to 'build')
-rw-r--r-- | build/release-notes.js | 3 | ||||
-rw-r--r-- | build/release.js | 4 | ||||
-rw-r--r-- | build/tasks/build.js | 32 |
3 files changed, 27 insertions, 12 deletions
diff --git a/build/release-notes.js b/build/release-notes.js index c9676f28f..00cdc8659 100644 --- a/build/release-notes.js +++ b/build/release-notes.js @@ -16,7 +16,8 @@ http.request({ host: "bugs.jquery.com", port: 80, method: "GET", - path: "/query?status=closed&resolution=fixed&max=400&component=!web&order=component&milestone=" + version + path: "/query?status=closed&resolution=fixed&max=400&" + + "component=!web&order=component&milestone=" + version }, function( res ) { var data = []; diff --git a/build/release.js b/build/release.js index 8a2b98e58..2aa785eca 100644 --- a/build/release.js +++ b/build/release.js @@ -88,7 +88,9 @@ module.exports = function( Release ) { var archiver = require( "archiver" )( "zip" ), md5file = cdnFolder + "/" + cdn + "-md5.txt", - output = fs.createWriteStream( cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip" ); + output = fs.createWriteStream( + cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip" + ); output.on( "error", function( err ) { throw err; diff --git a/build/tasks/build.js b/build/tasks/build.js index 02c6597e3..738f934b4 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -1,6 +1,7 @@ /** * Special concat/build task to handle various jQuery build requirements - * Concats AMD modules, removes their definitions, and includes/excludes specified modules + * Concats AMD modules, removes their definitions, + * and includes/excludes specified modules */ module.exports = function( grunt ) { @@ -35,7 +36,8 @@ module.exports = function( grunt ) { /** * Strip all definitions generated by requirejs * Convert "var" modules to var declarations - * "var module" means the module only contains a return statement that should be converted to a var declaration + * "var module" means the module only contains a return + * statement that should be converted to a var declaration * This is indicated by including the file in any "var" folder * @param {String} name * @param {String} path @@ -98,7 +100,8 @@ module.exports = function( grunt ) { grunt.registerMultiTask( "build", - "Concatenate source, remove sub AMD definitions, (include/exclude modules with +/- flags), embed date/version", + "Concatenate source, remove sub AMD definitions, " + + "(include/exclude modules with +/- flags), embed date/version", function() { var flag, index, done = this.async(), @@ -113,7 +116,8 @@ module.exports = function( grunt ) { /** * Recursively calls the excluder to remove on all modules in the list * @param {Array} list - * @param {String} [prepend] Prepend this to the module name. Indicates we're walking a directory + * @param {String} [prepend] Prepend this to the module name. + * Indicates we're walking a directory */ excludeList = function( list, prepend ) { if ( list ) { @@ -121,7 +125,9 @@ module.exports = function( grunt ) { list.forEach(function( module ) { // Exclude var modules as well if ( module === "var" ) { - excludeList( fs.readdirSync( srcFolder + prepend + module ), prepend + module ); + excludeList( + fs.readdirSync( srcFolder + prepend + module ), prepend + module + ); return; } if ( prepend ) { @@ -143,7 +149,9 @@ module.exports = function( grunt ) { }, /** * Adds the specified module to the excluded or included list, depending on the flag - * @param {String} flag A module path relative to the src directory starting with + or - to indicate whether it should included or excluded + * @param {String} flag A module path relative to + * the src directory starting with + or - to indicate + * whether it should included or excluded */ excluder = function( flag ) { var m = /^(\+|\-|)([\w\/-]+)$/.exec( flag ), @@ -162,7 +170,7 @@ module.exports = function( grunt ) { // It's fine if the directory is not there try { excludeList( fs.readdirSync( srcFolder + module ), module ); - } catch( e ) { + } catch ( e ) { grunt.verbose.writeln( e ); } } @@ -192,8 +200,10 @@ module.exports = function( grunt ) { // * none (implicit exclude) // *:* all (implicit include) // *:*:-css all except css and dependents (explicit > implicit) - // *:*:-css:+effects same (excludes effects because explicit include is trumped by explicit exclude of dependency) - // *:+effects none except effects and its dependencies (explicit include trumps implicit exclude of dependency) + // *:*:-css:+effects same (excludes effects because explicit include is + // trumped by explicit exclude of dependency) + // *:+effects none except effects and its dependencies + // (explicit include trumps implicit exclude of dependency) delete flags[ "*" ]; for ( flag in flags ) { excluder( flag ); @@ -239,7 +249,9 @@ module.exports = function( grunt ) { // Turn off opt-in if necessary if ( !optIn ) { // Overwrite the default inclusions with the explicit ones provided - config.rawText.jquery = "define([" + (included.length ? included.join(",") : "") + "]);"; + config.rawText.jquery = "define([" + + (included.length ? included.join(",") : "") + + "]);"; } // Trace dependencies and concatenate files |