@@ -13,15 +13,7 @@ module.exports = function( grunt ) {
1313 }
1414
1515 var fs = require ( "fs" ) ,
16- gzip = require ( "gzip-js" ) ,
17- oldNode = / ^ v 0 \. / . test ( process . version ) ;
18-
19- // Support: Node.js <4
20- // Skip running tasks that dropped support for Node.js 0.12
21- // in this Node version.
22- function runIfNewNode ( task ) {
23- return oldNode ? "print_old_node_message:" + task : task ;
24- }
16+ gzip = require ( "gzip-js" ) ;
2517
2618 if ( ! grunt . option ( "filename" ) ) {
2719 grunt . option ( "filename" , "jquery.js" ) ;
@@ -187,41 +179,32 @@ module.exports = function( grunt ) {
187179 } ) ;
188180
189181 // Load grunt tasks from NPM packages
190- // Support: Node.js <4
191- // Don't load the eslint task in old Node.js, it won't parse.
192- require ( "load-grunt-tasks" ) ( grunt , {
193- pattern : oldNode ? [ "grunt-*" , "!grunt-eslint" ] : [ "grunt-*" ]
194- } ) ;
182+ require ( "load-grunt-tasks" ) ( grunt ) ;
195183
196184 // Integrate jQuery specific tasks
197185 grunt . loadTasks ( "build/tasks" ) ;
198186
199- grunt . registerTask ( "print_old_node_message" , function ( ) {
200- var task = [ ] . slice . call ( arguments ) . join ( ":" ) ;
201- grunt . log . writeln ( "Old Node.js detected, running the task \"" + task + "\" skipped..." ) ;
202- } ) ;
203-
204187 grunt . registerTask ( "lint" , [
205188 "jsonlint" ,
206189
207190 // Running the full eslint task without breaking it down to targets
208191 // would run the dist target first which would point to errors in the built
209192 // file, making it harder to fix them. We want to check the built file only
210193 // if we already know the source files pass the linter.
211- runIfNewNode ( "eslint:dev" ) ,
212- runIfNewNode ( "eslint:dist" )
194+ "eslint:dev" ,
195+ "eslint:dist"
213196 ] ) ;
214197
215198 grunt . registerTask ( "lint:newer" , [
216199 "newer:jsonlint" ,
217200
218201 // Don't replace it with just the task; see the above comment.
219- runIfNewNode ( "newer:eslint:dev" ) ,
220- runIfNewNode ( "newer:eslint:dist" )
202+ "newer:eslint:dev" ,
203+ "newer:eslint:dist"
221204 ] ) ;
222205
223- grunt . registerTask ( "test:fast" , runIfNewNode ( "node_smoke_tests" ) ) ;
224- grunt . registerTask ( "test:slow" , runIfNewNode ( "promises_aplus_tests" ) ) ;
206+ grunt . registerTask ( "test:fast" , "node_smoke_tests" ) ;
207+ grunt . registerTask ( "test:slow" , "promises_aplus_tests" ) ;
225208
226209 grunt . registerTask ( "test" , [
227210 "test:fast" ,
@@ -230,20 +213,20 @@ module.exports = function( grunt ) {
230213
231214 grunt . registerTask ( "dev" , [
232215 "build:*:*" ,
233- runIfNewNode ( "newer:eslint:dev" ) ,
216+ "newer:eslint:dev" ,
234217 "newer:uglify" ,
235218 "remove_map_comment" ,
236219 "dist:*" ,
237220 "compare_size"
238221 ] ) ;
239222
240223 grunt . registerTask ( "default" , [
241- runIfNewNode ( "eslint:dev" ) ,
224+ "eslint:dev" ,
242225 "build:*:*" ,
243226 "uglify" ,
244227 "remove_map_comment" ,
245228 "dist:*" ,
246- runIfNewNode ( "eslint:dist" ) ,
229+ "eslint:dist" ,
247230 "test:fast" ,
248231 "compare_size"
249232 ] ) ;
0 commit comments