Simplify grunt file and update .gitignore

This commit is contained in:
Timothy Warren 2014-11-03 16:50:40 -05:00
parent d6059b87d6
commit 9264cc3438
2 changed files with 4 additions and 34 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@ build
build/*
coverage
coverage/*
npm-debug.log
tests/FB_TEST_DB.FDB

View File

@ -1,14 +1,9 @@
module.exports = function(grunt) {
'use strict';
var tests = 'tests/**/*_test.js';
var src = 'lib/**/*.js';
var reportDir = 'coverage';
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: [ 'build' ],
jsdoc: {
dist: {
src: ['lib/*.js', 'README.md'],
@ -20,45 +15,18 @@ module.exports = function(grunt) {
}
},
nodeunit: {
all: [tests],
all: ['tests/**/*_test.js'],
options: {
reporter: 'verbose'
}
},
watch: {
files: [src, tests],
tasks: 'default'
},
instrument: {
files: src,
options: {
lazy: true,
basePath : 'build/instrument/'
}
},
storeCoverage : {
options : {
dir: reportDir
}
},
makeReport: {
src: 'build/reports/**/*.json',
options: {
type: ['lcov', 'html'],
dir: reportDir,
print: 'detail'
}
}
});
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-istanbul');
grunt.registerTask('default', ['nodeunit','jsdoc']);
grunt.registerTask('tests', 'nodeunit');
grunt.registerTask('docs', 'jsdoc');
grunt.registerTask('cover', ['clean', 'instrument', 'tests', 'storeCoverage', 'makeReport']);
};