Skip to content

Commit e9359e8

Browse files
add task for specs server
1 parent 93d015d commit e9359e8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Gruntfile.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ var build = (function(){
66
// travis testing
77
if (process.env && process.env.BUILD) return process.env.BUILD == 'default' ? 'all' : 'nocompat';
88
// local testing
9-
else return process.argv[2] == null || process.argv[2] == 'all' ? 'all' : 'nocompat';
9+
else return process.argv[2] == 'default' || process.argv[2] == null ? 'all' : 'nocompat';
1010
})();
11-
require('./Tests/httpServer.js')(build);
1211

13-
module.exports = function(grunt) {
12+
module.exports = function(grunt){
1413

1514
grunt.loadNpmTasks('grunt-contrib-uglify');
1615
require('load-grunt-tasks')(grunt);
@@ -59,11 +58,14 @@ module.exports = function(grunt) {
5958
}
6059
});
6160

62-
var compatBuild = ['clean:specs', 'packager:all', 'packager:specs'];
63-
var nocompatBuild = ['clean:specs', 'packager:nocompat', 'packager:specs-nocompat'];
61+
var compatBuild = ['clean:specs', 'packager:all', 'packager:specs', 'specsserver'];
62+
var nocompatBuild = ['clean:specs', 'packager:nocompat', 'packager:specs-nocompat', 'specsserver'];
6463
var tasks = options.travis.build == 'default' ? compatBuild : nocompatBuild;
6564
tasks = usePhantom ? tasks.concat('karma:continuous') : tasks.concat('karma:sauceTask');
6665

66+
grunt.registerTask('specsserver', function(){
67+
require('./Tests/httpServer.js')(build);
68+
});
6769
grunt.registerTask('default', compatBuild.concat('karma:continuous')); // local testing - compat build
6870
grunt.registerTask('nocompat', nocompatBuild.concat('karma:continuous')); // local testing - no compat build
6971
grunt.registerTask('default:travis', tasks); // Travis & Sauce Labs

0 commit comments

Comments
 (0)