Skip to content

Commit 0771973

Browse files
committed
Build: Rearrange grunt/npm tasks into a build/dist/test pattern
Ref 76df9e4 Ref bb928bd Conflicts: Gruntfile.js package.json
1 parent 6ae222a commit 0771973

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Gruntfile.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module.exports = function( grunt ) {
120120
},
121121
watch: {
122122
files: [ "<%= jshint.all.src %>" ],
123-
tasks: "dev"
123+
tasks: [ "dev" ]
124124
},
125125
uglify: {
126126
all: {
@@ -153,11 +153,15 @@ module.exports = function( grunt ) {
153153
// Integrate jQuery specific tasks
154154
grunt.loadTasks( "build/tasks" );
155155

156-
grunt.registerTask( "lint", [ "jshint", "jscs" ] );
156+
grunt.registerTask( "lint", [ "jsonlint", "jshint", "jscs" ] );
157+
158+
// Only defined for master at this time, but kept for cross-branch consistency
159+
grunt.registerTask( "test_fast", [] );
160+
161+
grunt.registerTask( "test", [ "test_fast" ] );
157162

158163
// Short list as a high frequency watch task
159-
grunt.registerTask( "dev", [ "build:*:*", "lint" ] );
164+
grunt.registerTask( "dev", [ "build:*:*", "lint", "uglify", "dist:*" ] );
160165

161-
// Default grunt
162-
grunt.registerTask( "default", [ "jsonlint", "dev", "uglify", "dist:*", "compare_size" ] );
166+
grunt.registerTask( "default", [ "dev", "test_fast", "compare_size" ] );
163167
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"scripts": {
5555
"build": "npm install && grunt",
5656
"start": "grunt watch",
57-
"test": "grunt"
57+
"test": "grunt && grunt test"
5858
},
5959
"commitplease": {
6060
"components": [

0 commit comments

Comments
 (0)