forked from karma-runner/karma
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
114 lines (100 loc) · 2.43 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
108
109
110
111
112
113
114
# JS Hint options
JSHINT_BROWSER =
browser: true,
es5: true,
strict: false
undef: false
camelcase: false
JSHINT_NODE =
node: true,
es5: true,
strict: false
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkgFile: 'package.json'
files:
server: ['lib/**/*.js']
client: ['static/karma.src.js']
grunt: ['grunt.js', 'tasks/**/*.js']
scripts: ['scripts/*.js']
build:
client: '<%= files.client %>'
test:
unit: 'simplemocha:unit'
tasks: 'simplemocha:tasks'
client: 'test/client/karma.conf.js'
e2e: 'test/e2e/*/karma.conf.js'
simplemocha:
options:
ui: 'bdd'
reporter: 'dot'
unit:
src: [
'test/unit/mocha-globals.coffee'
'test/unit/**/*.coffee'
]
tasks:
src: [
'test/tasks/mocha-globals.coffee'
'test/tasks/**/*.coffee'
]
# JSHint options
# http://www.jshint.com/options/
jshint:
server:
files:
src: '<%= files.server %>'
options: JSHINT_NODE
grunt:
files:
src: '<%= files.grunt %>'
options: JSHINT_NODE
scripts:
files:
src: '<%= files.scripts %>'
options: JSHINT_NODE
client:
files:
src: '<%= files.client %>'
options: JSHINT_BROWSER
options:
quotmark: 'single'
bitwise: true
indent: 2
camelcase: true
strict: true
trailing: true
curly: true
eqeqeq: true
immed: true
latedef: true
newcap: true
noempty: true
unused: true
noarg: true
sub: true
undef: true
maxdepth: 4
maxlen: 100
globals: {}
# CoffeeLint options
# http://www.coffeelint.org/#options
coffeelint:
unittests: files: src: ['test/unit/**/*.coffee']
taskstests: files: src: ['test/tasks/**/*.coffee']
options:
max_line_length:
value: 100
grunt.loadTasks 'tasks'
grunt.loadNpmTasks 'grunt-simple-mocha'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.registerTask 'default', ['build', 'test', 'jshint', 'coffeelint']
grunt.registerTask 'release', 'Build, bump and publish to NPM.', (type) ->
grunt.task.run [
'contributors'
'build'
"bump:#{type||'patch'}"
'npm-publish'
]