@@ -41,6 +41,15 @@ minify.svg.files[ min[ 1 ] ] = [ max[ 1 ] ];
4141minify . combined . files [ min [ 2 ] ] = [ combined ] ;
4242concat [ combined ] = [ max [ 0 ] , max [ 1 ] ] ;
4343
44+ const oldNode = / ^ v 1 0 \. / . test ( process . version ) ;
45+
46+ // Support: Node.js <12
47+ // Skip running tasks that dropped support for Node.js 10
48+ // in this Node version.
49+ function runIfNewNode ( task ) {
50+ return oldNode ? "print_old_node_message:" + task : task ;
51+ }
52+
4453require ( "load-grunt-tasks" ) ( grunt ) ;
4554
4655grunt . initConfig ( {
@@ -54,7 +63,7 @@ grunt.initConfig( {
5463 "jquery-color" : [
5564 "3.x-git" ,
5665 "3.x-git.min" ,
57- "3.6.0 " ,
66+ "3.6.1 " ,
5867 "3.5.1" ,
5968 "3.4.1" ,
6069 "3.3.1" ,
@@ -73,15 +82,17 @@ grunt.initConfig( {
7382 } ,
7483
7584 npmcopy : {
76- all : {
85+ options : {
86+ destPrefix : "external"
87+ } ,
88+ legacy : {
7789 options : {
78- destPrefix : "external"
90+
91+ // jQuery `<1.11` and `>=2 <2.1` wasn't published on npm, so
92+ // we maintain their copies directly in the repository.
93+ srcPrefix : "external-legacy-source"
7994 } ,
8095 files : {
81- "qunit/qunit.js" : "qunit/qunit/qunit.js" ,
82- "qunit/qunit.css" : "qunit/qunit/qunit.css" ,
83- "qunit/LICENSE.txt" : "qunit/LICENSE.txt" ,
84-
8596 "jquery-1.8.3/jquery.js" : "jquery-1.8.3/jquery.js" ,
8697 "jquery-1.8.3/MIT-LICENSE.txt" : "jquery-1.8.3/MIT-LICENSE.txt" ,
8798
@@ -91,15 +102,22 @@ grunt.initConfig( {
91102 "jquery-1.10.2/jquery.js" : "jquery-1.10.2/jquery.js" ,
92103 "jquery-1.10.2/MIT-LICENSE.txt" : "jquery-1.10.2/MIT-LICENSE.txt" ,
93104
105+ "jquery-2.0.3/jquery.js" : "jquery-2.0.3/jquery.js" ,
106+ "jquery-2.0.3/MIT-LICENSE.txt" : "jquery-2.0.3/MIT-LICENSE.txt"
107+ }
108+ } ,
109+ modern : {
110+ files : {
111+ "qunit/qunit.js" : "qunit/qunit/qunit.js" ,
112+ "qunit/qunit.css" : "qunit/qunit/qunit.css" ,
113+ "qunit/LICENSE.txt" : "qunit/LICENSE.txt" ,
114+
94115 "jquery-1.11.3/jquery.js" : "jquery-1.11.3/dist/jquery.js" ,
95116 "jquery-1.11.3/MIT-LICENSE.txt" : "jquery-1.11.3/MIT-LICENSE.txt" ,
96117
97118 "jquery-1.12.4/jquery.js" : "jquery-1.12.4/dist/jquery.js" ,
98119 "jquery-1.12.4/LICENSE.txt" : "jquery-1.12.4/LICENSE.txt" ,
99120
100- "jquery-2.0.3/jquery.js" : "jquery-2.0.3/jquery.js" ,
101- "jquery-2.0.3/MIT-LICENSE.txt" : "jquery-2.0.3/MIT-LICENSE.txt" ,
102-
103121 "jquery-2.1.4/jquery.js" : "jquery-2.1.4/dist/jquery.js" ,
104122 "jquery-2.1.4/MIT-LICENSE.txt" : "jquery-2.1.4/MIT-LICENSE.txt" ,
105123
@@ -124,8 +142,8 @@ grunt.initConfig( {
124142 "jquery-3.5.1/jquery.js" : "jquery-3.5.1/dist/jquery.js" ,
125143 "jquery-3.5.1/LICENSE.txt" : "jquery-3.5.1/LICENSE.txt" ,
126144
127- "jquery-3.6.0 /jquery.js" : "jquery-3.6.0 /dist/jquery.js" ,
128- "jquery-3.6.0 /LICENSE.txt" : "jquery-3.6.0 /LICENSE.txt" ,
145+ "jquery-3.6.1 /jquery.js" : "jquery-3.6.1 /dist/jquery.js" ,
146+ "jquery-3.6.1 /LICENSE.txt" : "jquery-3.6.1 /LICENSE.txt" ,
129147
130148 "jquery/jquery.js" : "jquery/dist/jquery.js" ,
131149 "jquery/LICENSE.txt" : "jquery/LICENSE.txt"
@@ -306,15 +324,20 @@ grunt.registerTask( "print_no_browserstack_legacy_message", () => {
306324 "tests on legacy browsers skipped..." ) ;
307325} ) ;
308326
327+ grunt . registerTask ( "print_old_node_message" , ( ...args ) => {
328+ const task = args . join ( ":" ) ;
329+ grunt . log . writeln ( "Old Node.js detected, running the task \"" + task + "\" skipped..." ) ;
330+ } ) ;
331+
309332grunt . registerTask ( "default" , [
310- "eslint" ,
333+ runIfNewNode ( "eslint" ) ,
311334 "npmcopy" ,
312335 "qunit" ,
313336 "build" ,
314337 "compare_size"
315338] ) ;
316339grunt . registerTask ( "build" , [ "max" , "concat" , "uglify" ] ) ;
317- grunt . registerTask ( "ci" , [ "eslint" , "qunit " ] ) ;
340+ grunt . registerTask ( "ci" , [ "default " ] ) ;
318341grunt . registerTask ( "karma-browserstack-current" , [
319342 "build" ,
320343 isBrowserStack ? "karma:browserstack-current" : "karma:local"
0 commit comments