Skip to content

Commit

Permalink
Build: Drop workarounds for Node.js 6 in Gruntfile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mgol committed Oct 22, 2019
1 parent ad3c2ef commit 9f4204e
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions Gruntfile.js
Expand Up @@ -13,15 +13,7 @@ module.exports = function( grunt ) {
}

var fs = require( "fs" ),
gzip = require( "gzip-js" ),
oldNode = /^v6\./.test( process.version );

// Support: Node.js <8
// Skip running tasks that dropped support for Node.js 6
// in those Node versions.
function runIfNewNode( task ) {
return oldNode ? "print_old_node_message:" + task : task;
}
gzip = require( "gzip-js" );

if ( !grunt.option( "filename" ) ) {
grunt.option( "filename", "jquery.js" );
Expand Down Expand Up @@ -317,13 +309,6 @@ module.exports = function( grunt ) {
// Integrate jQuery specific tasks
grunt.loadTasks( "build/tasks" );

// Support: Node.js <8
// Print a message on Node.js <8 notifying the task is skipped there.
grunt.registerTask( "print_old_node_message", function() {
var task = [].slice.call( arguments ).join( ":" );
grunt.log.writeln( "Old Node.js detected, running the task \"" + task + "\" skipped..." );
} );

grunt.registerTask( "lint", [
"jsonlint",

Expand All @@ -346,10 +331,7 @@ module.exports = function( grunt ) {
grunt.registerTask( "test:fast", "node_smoke_tests" );
grunt.registerTask( "test:slow", [
"promises_aplus_tests",

// Support: Node.js <8
// Karma no longer supports Node.js <8 as it relies on async-await internally.
runIfNewNode( "karma:jsdom" )
"karma:jsdom"
] );

grunt.registerTask( "test", [
Expand Down

0 comments on commit 9f4204e

Please sign in to comment.