Skip to content

Commit

Permalink
update grunt
Browse files Browse the repository at this point in the history
Change-Id: I6369cbba1253ae12a29930da1fffdf44dba8b0da
  • Loading branch information
py8765 committed May 30, 2014
1 parent f5563d0 commit e58f38b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 37 deletions.
21 changes: 0 additions & 21 deletions Makefile

This file was deleted.

6 changes: 6 additions & 0 deletions coverage/blanket.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var path = require('path');
var srcDir = path.join(__dirname, '..', 'lib');

require('blanket')({
pattern: srcDir
});
15 changes: 4 additions & 11 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@ module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
jscoverage: {
options: {
inputDirectory: 'lib',
outputDirectory: 'lib-cov'
}
},
mochaTest: {
dot: {
test: {
options: {
reporter: 'dot',
timeout: 5000
reporter: 'spec',
require: 'coverage/blanket'
},
src: src
},
Expand All @@ -51,10 +49,5 @@ module.exports = function(grunt) {
});

// Default task.
grunt.registerTask('default', ['clean', 'jscoverage', 'mochaTest:dot', 'jshint:all']);

grunt.registerTask('test-cov', 'run mocha html-cov reporter to coverage.html', function() {
process.env.POMELO_COV = 1;
grunt.task.run(['mochaTest:coverage']);
});
grunt.registerTask('default', ['clean', 'jscoverage', 'mochaTest', 'jshint:all']);
};
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
module.exports = process.env.POMELO_COV ?
require('./lib-cov/pomelo') :
require('./lib/pomelo');
module.exports = require('./lib/pomelo');
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"grunt-mocha-test": "0.8.x",
"grunt-jscoverage": "0.0.3",
"grunt-contrib-clean": "0.5.x",
"grunt-contrib-jshint": "~0.8.0"
"grunt-contrib-jshint": "~0.8.0",
"blanket": "~1.1.6"
}
}
}

0 comments on commit e58f38b

Please sign in to comment.