-
Notifications
You must be signed in to change notification settings - Fork 59
/
Gruntfile.coffee
108 lines (91 loc) · 1.9 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
104
105
106
107
module.exports = (grunt) ->
'use strict'
require('time-grunt') grunt
# Dynamically load npm tasks
require('load-grunt-config') grunt
# Initialize configuration object
grunt.initConfig
# Load in the module information
pkg: grunt.file.readJSON 'package.json'
readme: 'README.md'
gruntfile: 'Gruntfile.coffee'
clean:
cover: [
'coverage'
],
instrumented: [
'lib/*.js'
]
watch:
options:
spawn: false
lib:
files: 'lib/*.coffee'
tasks: [
'instrument'
'mochaTest'
]
test:
files: 'test/**/*.coffee'
tasks: [
'instrument'
'mochaTest'
]
gruntfile:
files: '<%= gruntfile %>'
tasks: [
'coffeelint:gruntfile'
]
coffeelint:
options:
configFile: 'coffeelint.json'
default:
src: [
'lib/*.coffee'
'test/**/*.coffee'
]
gruntfile:
src: '<%= gruntfile %>'
markdownlint:
options:
config: require './.markdownlint.json'
default:
src: [
'<%= readme %>'
]
coffeecov:
transpile:
src: 'lib'
dest: 'lib'
mochaTest:
test:
options:
reporter: 'mocha-phantom-coverage-reporter'
require: 'coffee-script/register'
src: [
'test/unit/*-test.coffee'
'test/e2e/cli-test.coffee'
]
coveralls:
upload:
src: 'coverage/coverage.lcov'
# Register alias tasks
grunt.registerTask 'cover', [
'clean',
'instrument',
'mochaTest'
]
grunt.registerTask 'default', [
'watch'
'mochaTest'
]
grunt.registerTask 'instrument', [ 'coffeecov' ]
grunt.registerTask 'lint', [
'coffeelint',
'markdownlint'
]
grunt.registerTask 'test', [
'lint'
'cover'
]
return