2014-02-14 11:39:05 -05:00
|
|
|
module.exports = (grunt) ->
|
|
|
|
|
|
|
|
# Project configuration.
|
|
|
|
grunt.initConfig
|
2014-12-22 08:41:07 -05:00
|
|
|
forever:
|
|
|
|
app:
|
|
|
|
options:
|
|
|
|
index: "app.js"
|
|
|
|
|
2014-02-14 11:39:05 -05:00
|
|
|
coffee:
|
|
|
|
server:
|
|
|
|
expand: true,
|
|
|
|
flatten: false,
|
|
|
|
cwd: 'app/coffee',
|
|
|
|
src: ['**/*.coffee'],
|
|
|
|
dest: 'app/js/',
|
|
|
|
ext: '.js'
|
|
|
|
|
|
|
|
app_server:
|
|
|
|
expand: true,
|
|
|
|
flatten: false,
|
2015-01-07 05:33:55 -05:00
|
|
|
src: ['app.coffee', 'cluster.coffee'],
|
2014-02-14 11:39:05 -05:00
|
|
|
dest: './',
|
|
|
|
ext: '.js'
|
|
|
|
|
|
|
|
server_tests:
|
2014-06-19 12:07:50 -04:00
|
|
|
expand: true,
|
|
|
|
flatten: false,
|
|
|
|
cwd: 'test/acceptence/coffee',
|
|
|
|
src: ['*.coffee', '**/*.coffee'],
|
|
|
|
dest: 'test/acceptence/js/',
|
|
|
|
ext: '.js'
|
|
|
|
|
|
|
|
server_acc_tests:
|
2014-02-14 11:39:05 -05:00
|
|
|
expand: true,
|
|
|
|
flatten: false,
|
|
|
|
cwd: 'test/unit/coffee',
|
|
|
|
src: ['*.coffee', '**/*.coffee'],
|
|
|
|
dest: 'test/unit/js/',
|
|
|
|
ext: '.js'
|
|
|
|
|
|
|
|
watch:
|
|
|
|
server_coffee:
|
2015-01-07 05:33:55 -05:00
|
|
|
files: ['app/*.coffee','app/**/*.coffee', 'test/unit/coffee/**/*.coffee', 'test/unit/coffee/*.coffee', "app.coffee", "cluster.coffee"]
|
2014-02-14 11:39:05 -05:00
|
|
|
tasks: ["clean", 'coffee', 'mochaTest']
|
|
|
|
|
|
|
|
clean: ["app/js", "test/unit/js", "app.js"]
|
|
|
|
|
|
|
|
nodemon:
|
|
|
|
dev:
|
2014-06-19 12:07:50 -04:00
|
|
|
script: 'app.js'
|
2014-02-14 11:39:05 -05:00
|
|
|
options:
|
2014-06-19 12:07:50 -04:00
|
|
|
ext:"*.coffee"
|
|
|
|
|
2015-04-22 13:27:34 -04:00
|
|
|
execute:
|
|
|
|
app:
|
|
|
|
src: "app.js"
|
|
|
|
|
2014-02-14 11:39:05 -05:00
|
|
|
concurrent:
|
|
|
|
dev:
|
|
|
|
tasks: ['nodemon', 'watch']
|
|
|
|
options:
|
|
|
|
logConcurrentOutput: true
|
|
|
|
|
|
|
|
mochaTest:
|
2014-02-14 11:46:08 -05:00
|
|
|
unit:
|
|
|
|
src: ["test/unit/js/#{grunt.option('feature') or '**'}/*.js"]
|
2014-02-14 11:39:05 -05:00
|
|
|
options:
|
2014-02-14 11:46:08 -05:00
|
|
|
reporter: grunt.option('reporter') or 'spec'
|
|
|
|
grep: grunt.option("grep")
|
2014-06-19 12:07:50 -04:00
|
|
|
acceptence:
|
|
|
|
src: ["test/acceptence/js/#{grunt.option('feature') or '**'}/*.js"]
|
|
|
|
options:
|
|
|
|
reporter: grunt.option('reporter') or 'spec'
|
|
|
|
grep: grunt.option("grep")
|
|
|
|
|
2014-02-14 11:39:05 -05:00
|
|
|
|
|
|
|
grunt.loadNpmTasks 'grunt-contrib-coffee'
|
|
|
|
grunt.loadNpmTasks 'grunt-contrib-watch'
|
|
|
|
grunt.loadNpmTasks 'grunt-nodemon'
|
|
|
|
grunt.loadNpmTasks 'grunt-contrib-clean'
|
|
|
|
grunt.loadNpmTasks 'grunt-concurrent'
|
|
|
|
grunt.loadNpmTasks 'grunt-mocha-test'
|
2014-12-22 08:41:07 -05:00
|
|
|
grunt.loadNpmTasks 'grunt-forever'
|
2015-04-22 13:27:34 -04:00
|
|
|
grunt.loadNpmTasks 'grunt-bunyan'
|
|
|
|
grunt.loadNpmTasks 'grunt-execute'
|
2014-02-14 11:39:05 -05:00
|
|
|
|
2014-02-14 11:46:08 -05:00
|
|
|
grunt.registerTask "test:unit", ["coffee", "mochaTest:unit"]
|
2014-06-19 12:07:50 -04:00
|
|
|
grunt.registerTask "test:acceptence", ["coffee", "mochaTest:acceptence"]
|
2014-12-22 08:13:36 -05:00
|
|
|
grunt.registerTask "test:acceptance", ["test:acceptence"]
|
2014-06-19 12:07:50 -04:00
|
|
|
|
2014-02-14 11:46:08 -05:00
|
|
|
grunt.registerTask "ci", "test:unit"
|
2015-04-22 13:27:34 -04:00
|
|
|
grunt.registerTask 'default', ['coffee', 'bunyan','execute']
|
2014-02-14 11:39:05 -05:00
|
|
|
|
2014-02-14 11:46:08 -05:00
|
|
|
grunt.registerTask "compile", "coffee"
|
|
|
|
grunt.registerTask "install", "compile"
|
2014-02-14 11:39:05 -05:00
|
|
|
|