forked from karma-runner/karma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
122 lines (110 loc) · 2.76 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
115
116
117
118
119
120
121
122
# 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/testacular.src.js']
jasmine: ['adapter/jasmine.src.js']
mocha: ['adapter/mocha.src.js']
ngScenario: ['adapter/angular-scenario.src.js']
require: ['adapter/require.src.js']
qunit: ['adapter/qunit.src.js']
grunt: ['grunt.js', 'tasks/**/*.js']
build:
client: '<%= files.client %>'
jasmine: '<%= files.jasmine %>'
mocha: '<%= files.mocha %>'
ngScenario: '<%= files.ngScenario %>'
require: '<%= files.require %>'
qunit: '<%= files.qunit %>'
test:
unit: 'simplemocha:unit'
tasks: 'simplemocha:tasks'
client: 'test/client/testacular.conf.js'
e2e: 'test/e2e/*/testacular.conf.js'
simplemocha:
options:
ui: 'bdd'
reporter: 'dot'
unit:
src: [
'test/mocha-common.js'
'test/unit/**/*.coffee'
]
tasks:
src: [
'test/mocha-common.js'
'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
client:
files:
src: '<%= files.client %>'
options: JSHINT_BROWSER
jasmine:
files:
src: '<%= files.jasmine %>'
options: JSHINT_BROWSER
mocha:
files:
src: '<%= files.mocha %>'
options: JSHINT_BROWSER
qunit:
files:
src: '<%= files.qunit %>'
options: JSHINT_BROWSER
ngScenario:
files:
src: '<%= files.ngScenario %>'
options: JSHINT_BROWSER
require:
files:
src: '<%= files.require %>'
options: JSHINT_BROWSER
options:
quotmark: 'single'
camelcase: true
strict: true
trailing: true
curly: true
eqeqeq: true
immed: true
latedef: true
newcap: true
noarg: true
sub: true
undef: true
boss: true
globals: {}
grunt.loadTasks 'tasks'
grunt.loadNpmTasks 'grunt-simple-mocha'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.registerTask 'default', ['build', 'jshint', 'test']
grunt.registerTask 'release', 'Build, bump and publish to NPM.', (type) ->
grunt.task.run [
'build',
"bump:#{type||'patch'}",
'npm-publish'
]