-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathGruntfile.coffee
46 lines (38 loc) · 1.05 KB
/
Gruntfile.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module.exports = ->
@initConfig
pkg: @file.readJSON 'package.json'
coffee:
base:
expand: true
cwd: 'src'
src: ['*.coffee']
dest: 'lib'
ext: '.js'
mixins:
expand: true
cwd: 'src/mixin'
src: ['*.coffee']
dest: 'lib/mixin'
ext: '.js'
# Automated recompilation and testing during development
watch:
files: ['src/*.coffee', 'src/**/*.coffee' ]
tasks: ['test']
cafemocha:
specs:
src: ['src/spec/*.coffee', 'src/mixin/spec/*.coffee']
options:
require: 'coffee-script/register'
reporter: 'dot'
# Grunt plugins used for building
@loadNpmTasks 'grunt-contrib-coffee'
# Grunt plugins used for testing
@loadNpmTasks 'grunt-contrib-watch'
@loadNpmTasks 'grunt-cafe-mocha'
# Our local tasks
@registerTask 'build', 'Build datapumps', =>
@task.run 'coffee'
@registerTask 'test', 'Build datapumps and run tests', =>
@task.run 'coffee'
@task.run 'cafemocha'
@registerTask 'default', ['test']