mirror of
https://github.com/danog/inline-critical.git
synced 2024-11-30 04:29:07 +01:00
53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
// Generated on 2014-08-03 using generator-nodejs 2.0.1
|
|
module.exports = function (grunt) {
|
|
grunt.initConfig({
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
complexity: {
|
|
generic: {
|
|
src: ['app/**/*.js'],
|
|
options: {
|
|
errorsOnly: false,
|
|
cyclometric: 6, // default is 3
|
|
halstead: 16, // default is 8
|
|
maintainability: 100 // default is 100
|
|
}
|
|
}
|
|
},
|
|
jshint: {
|
|
all: [
|
|
'Gruntfile.js',
|
|
'app/**/*.js',
|
|
'test/**/*.js'
|
|
],
|
|
options: {
|
|
jshintrc: true
|
|
}
|
|
},
|
|
mochacli: {
|
|
all: ['test/**/*.js'],
|
|
options: {
|
|
reporter: 'spec',
|
|
ui: 'bdd',
|
|
timeout: 10000
|
|
}
|
|
},
|
|
watch: {
|
|
js: {
|
|
files: ['**/*.js', '!node_modules/**/*.js'],
|
|
tasks: ['default'],
|
|
options: {
|
|
nospawn: true
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
grunt.loadNpmTasks('grunt-complexity');
|
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
grunt.loadNpmTasks('grunt-mocha-cli');
|
|
grunt.registerTask('test', ['complexity', 'jshint', 'mochacli', 'watch']);
|
|
grunt.registerTask('ci', ['complexity', 'jshint', 'mochacli']);
|
|
grunt.registerTask('default', ['test']);
|
|
};
|