-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
52 lines (43 loc) · 1.21 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
47
48
49
50
51
52
module.exports = (grunt) ->
config =
pkg: (grunt.file.readJSON('package.json'))
coffeelint:
options:
configFile: 'coffeelint.json'
daemonpid: ['src/**/*.coffee', 'test/**/*.coffee']
coffee:
daemonpid:
expand: true,
flatten: false,
cwd: 'src',
src: ['.//**/*.coffee'],
dest: 'dist',
ext: '.js'
test:
expand: true,
flatten: false,
cwd: 'test',
src: ['./**/*.coffee'],
dest: 'test',
ext: '.js'
watch:
files: ['src/**/*.coffee', 'test/**/*.coffee'],
tasks: ['test']
configFiles:
files: ['Gruntfile.coffee']
options:
reload: true
mochaTest:
options:
reporter: 'spec'
src: ['test/**/*.js']
clean:
all: ['dist', 'test/**/*.js']
grunt.initConfig(config)
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-mocha-test')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.registerTask('compile', ['coffeelint', 'clean', 'coffee']);
grunt.registerTask('test', ['compile', 'mochaTest']);