2017-04-10 17:49:32 +00:00
|
|
|
module.exports = function(grunt) {
|
2017-04-26 22:01:48 +00:00
|
|
|
let pkg = grunt.file.readJSON('package.json')
|
2017-04-10 17:49:32 +00:00
|
|
|
|
|
|
|
grunt.initConfig({
|
2017-04-26 22:01:48 +00:00
|
|
|
pkg: pkg,
|
2017-04-10 17:49:32 +00:00
|
|
|
|
|
|
|
karma: {
|
|
|
|
unit: {
|
|
|
|
configFile: 'karma.conf.js'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
coveralls: {
|
|
|
|
options: {
|
|
|
|
coverageDir: 'tests/coverage/',
|
|
|
|
force: true
|
|
|
|
}
|
2017-04-26 22:01:48 +00:00
|
|
|
},
|
|
|
|
standard: {
|
|
|
|
options: pkg.standard,
|
|
|
|
lib: {
|
|
|
|
src: ['lib/**/*.js']
|
|
|
|
}
|
2017-04-10 17:49:32 +00:00
|
|
|
}
|
2017-04-26 22:01:48 +00:00
|
|
|
})
|
2017-04-10 17:49:32 +00:00
|
|
|
|
2017-04-26 22:01:48 +00:00
|
|
|
grunt.loadNpmTasks('grunt-karma')
|
|
|
|
grunt.loadNpmTasks('grunt-karma-coveralls')
|
|
|
|
grunt.loadNpmTasks('grunt-standard')
|
2017-04-10 17:49:32 +00:00
|
|
|
|
2017-04-26 22:01:48 +00:00
|
|
|
grunt.registerTask('test', ['standard', 'karma', 'coveralls'])
|
|
|
|
}
|