Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Commit e58f38b

Browse files
committed
update grunt
Change-Id: I6369cbba1253ae12a29930da1fffdf44dba8b0da
1 parent f5563d0 commit e58f38b

File tree

5 files changed

+14
-37
lines changed

5 files changed

+14
-37
lines changed

Makefile

-21
This file was deleted.

coverage/blanket.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var path = require('path');
2+
var srcDir = path.join(__dirname, '..', 'lib');
3+
4+
require('blanket')({
5+
pattern: srcDir
6+
});

gruntfile.js

+4-11
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ module.exports = function(grunt) {
1212

1313
// Project configuration.
1414
grunt.initConfig({
15-
// Metadata.
16-
pkg: grunt.file.readJSON('package.json'),
1715
jscoverage: {
1816
options: {
1917
inputDirectory: 'lib',
2018
outputDirectory: 'lib-cov'
2119
}
2220
},
2321
mochaTest: {
24-
dot: {
22+
test: {
2523
options: {
26-
reporter: 'dot',
27-
timeout: 5000
24+
reporter: 'spec',
25+
require: 'coverage/blanket'
2826
},
2927
src: src
3028
},
@@ -51,10 +49,5 @@ module.exports = function(grunt) {
5149
});
5250

5351
// Default task.
54-
grunt.registerTask('default', ['clean', 'jscoverage', 'mochaTest:dot', 'jshint:all']);
55-
56-
grunt.registerTask('test-cov', 'run mocha html-cov reporter to coverage.html', function() {
57-
process.env.POMELO_COV = 1;
58-
grunt.task.run(['mochaTest:coverage']);
59-
});
52+
grunt.registerTask('default', ['clean', 'jscoverage', 'mochaTest', 'jshint:all']);
6053
};

index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
module.exports = process.env.POMELO_COV ?
2-
require('./lib-cov/pomelo') :
3-
require('./lib/pomelo');
1+
module.exports = require('./lib/pomelo');

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"grunt-mocha-test": "0.8.x",
6060
"grunt-jscoverage": "0.0.3",
6161
"grunt-contrib-clean": "0.5.x",
62-
"grunt-contrib-jshint": "~0.8.0"
62+
"grunt-contrib-jshint": "~0.8.0",
63+
"blanket": "~1.1.6"
6364
}
64-
}
65+
}

0 commit comments

Comments
 (0)