Skip to content

Commit 73e28be

Browse files
committed
migrate to npm submodules task
1 parent 92d56d3 commit 73e28be

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

grunt.js

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module.exports = function( grunt ) {
33

44
"use strict";
55

6+
grunt.loadNpmTasks( "grunt-update-submodules" );
67
grunt.loadNpmTasks( "grunt-compare-size" );
78
grunt.loadNpmTasks( "grunt-git-authors" );
89

@@ -76,27 +77,6 @@ grunt.registerHelper( "git-date", function( fn ) {
7677
});
7778
});
7879

79-
grunt.registerTask( "submodules", function() {
80-
var done = this.async();
81-
82-
grunt.verbose.write( "Updating submodules..." );
83-
84-
grunt.utils.spawn({
85-
cmd: "git",
86-
args: [ "submodule", "update", "--init" ]
87-
}, function( err, result ) {
88-
if ( err ) {
89-
grunt.verbose.error();
90-
done( err );
91-
return;
92-
}
93-
94-
grunt.log.writeln( result );
95-
96-
done();
97-
});
98-
});
99-
10080
grunt.registerTask( "max", function() {
10181
var dist = "dist/jquery.simulate.js",
10282
done = this.async(),
@@ -163,7 +143,7 @@ grunt.registerTask( "manifest", function() {
163143
}, null, "\t" ) );
164144
});
165145

166-
grunt.registerTask( "default", "lint submodules qunit build compare_size" );
146+
grunt.registerTask( "default", "lint update_submodules qunit build compare_size" );
167147
grunt.registerTask( "build", "max min" );
168148

169149
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"devDependencies": {
3131
"grunt": "~0.3.17",
3232
"grunt-compare-size": ">=0.1.4",
33-
"grunt-git-authors": "1.0.0",
33+
"grunt-git-authors": ">=1.0.0",
34+
"grunt-update-submodules": ">=0.1.2",
3435
"testswarm": "0.2.2"
3536
},
3637
"keywords": [ "simulate", "events", "keyboard", "mouse", "jquery" ]

0 commit comments

Comments
 (0)