2013-12-16 19:36:32 +04:00
|
|
|
module.exports = (grunt) ->
|
|
|
|
@loadNpmTasks('grunt-contrib-jshint')
|
|
|
|
@loadNpmTasks('grunt-contrib-watch')
|
2013-12-17 17:37:17 +04:00
|
|
|
@loadNpmTasks('grunt-mocha-cli')
|
2013-12-16 19:36:32 +04:00
|
|
|
|
|
|
|
@initConfig
|
|
|
|
jshint:
|
2013-12-17 17:37:17 +04:00
|
|
|
all: [ 'lib/*.js', 'test/*.js' ]
|
2013-12-16 19:36:32 +04:00
|
|
|
options:
|
|
|
|
jshintrc: '.jshintrc'
|
|
|
|
|
|
|
|
watch:
|
|
|
|
all:
|
2013-12-17 17:37:17 +04:00
|
|
|
options:
|
|
|
|
atBegin: true
|
|
|
|
files: ['lib/**.js', 'test/*{,/*}']
|
2013-12-16 19:36:32 +04:00
|
|
|
tasks: ['test']
|
|
|
|
|
2013-12-17 17:37:17 +04:00
|
|
|
mochacli:
|
|
|
|
options:
|
|
|
|
files: 'test/*.js'
|
|
|
|
spec:
|
|
|
|
options:
|
|
|
|
reporter: 'spec'
|
|
|
|
|
2013-12-16 19:36:32 +04:00
|
|
|
@registerTask 'default', ['test']
|
|
|
|
@registerTask 'build', ['jshint']
|
2013-12-17 17:37:17 +04:00
|
|
|
@registerTask 'test', ['build', 'mochacli']
|