-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.coffee
103 lines (89 loc) · 1.98 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
coffeelint:
app:
files:
src: [
'Gruntfile.coffee'
'src/**/*.coffee'
'test/**/*.coffee'
]
options:
max_line_length:
value: 120
level: 'warn'
coffee:
compile:
files:
'dist/factory.js': 'src/**/*.coffee'
options:
bare: yes
watch:
scripts:
files: [
'Gruntfile.coffee'
'src/**/*.coffee'
'test/**/*.coffee'
]
tasks: ['test']
options:
interrupt: yes
simplemocha:
all:
src: ['test/**/*.coffee']
options:
reporter: 'spec'
ui: 'bdd'
uglify:
build:
src: 'dist/factory.js'
dest: 'dist/factory.min.js'
usebanner:
build:
options:
position: 'top'
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
linebreak: false
files:
src: ['dist/factory*.js']
env:
coverage:
COVER: true
instrument:
files : ['dist/factory.js']
makeReport:
src: 'build/reports/coverage.json'
options:
print: 'detail'
clean:
coverage:
['build/**/*']
grunt.loadNpmTasks 'grunt-banner'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-simple-mocha'
grunt.loadNpmTasks 'grunt-env'
grunt.loadNpmTasks 'grunt-istanbul'
grunt.registerTask 'test', [
'coffeelint'
'coffee'
'simplemocha'
]
grunt.registerTask 'build', [
'test'
'uglify'
'usebanner'
]
grunt.registerTask 'coverage', [
'clean:coverage'
'env:coverage'
'coffee'
'instrument'
'simplemocha'
'storeCoverage'
'makeReport'
]