Permalink
Browse files

Build: Rearrange grunt/npm tasks into a build/dist/test pattern

Ref 76df9e4
Closes gh-1980
  • Loading branch information...
gibson042 committed Dec 30, 2014
1 parent 53aa87f commit bb928bde7e7b85357fef3fedd450b04c03e965d7
Showing with 24 additions and 20 deletions.
  1. +7 −19 Gruntfile.js
  2. +16 −0 build/tasks/node_smoke_test.js
  3. +1 −1 package.json
View
@@ -121,7 +121,7 @@ module.exports = function( grunt ) {
},
watch: {
files: [ "<%= jshint.all.src %>" ],
tasks: "dev"
tasks: [ "dev" ]
},
uglify: {
all: {
@@ -154,26 +154,14 @@ module.exports = function( grunt ) {
// Integrate jQuery specific tasks
grunt.loadTasks( "build/tasks" );
grunt.registerTask( "lint", [ "jshint", "jscs" ] );
grunt.registerTask( "node_smoke_test", function() {
var done = this.async();
require( "jsdom" ).env( "", function( errors, window ) {
if ( errors ) {
console.error( errors );
done( false );
}
require( "./" )( window );
done();
});
});
// Short list as a high frequency watch task
grunt.registerTask( "dev", [ "build:*:*", "lint" ] );
grunt.registerTask( "lint", [ "jsonlint", "jshint", "jscs" ] );
grunt.registerTask( "test_fast", [ "node_smoke_test" ] );
grunt.registerTask( "test", [ "default", "test_fast" ] );
grunt.registerTask( "test", [ "test_fast" ] );
// Short list as a high frequency watch task
grunt.registerTask( "dev", [ "build:*:*", "lint", "uglify", "dist:*" ] );
grunt.registerTask( "default", [ "jsonlint", "dev", "uglify", "dist:*", "compare_size" ] );
grunt.registerTask( "default", [ "dev", "test_fast", "compare_size" ] );
};
@@ -0,0 +1,16 @@
module.exports = function( grunt ) {
"use strict";
grunt.registerTask( "node_smoke_test", function() {
var done = this.async();
require( "jsdom" ).env( "", function( errors, window ) {
if ( errors ) {
console.error( errors );
done( false );
}
require( "../.." )( window );
done();
});
});
};
View
@@ -55,7 +55,7 @@
"scripts": {
"build": "npm install && grunt",
"start": "grunt watch",
"test": "grunt test"
"test": "grunt && grunt test"
},
"commitplease": {
"components": [

0 comments on commit bb928bd

Please sign in to comment.