@@ -5,10 +5,10 @@ module.exports = (grunt) ->
5
5
grunt .initConfig
6
6
pkg : pkg
7
7
clean :
8
- build : [" dest/work" , " dist" ]
9
- workTemp : [" dest/work/cola" ]
10
- dev : [" dest/dev" ]
11
- " core-widget" : [" dist/cola-widget.js" ]
8
+ build : [ " dest/work" , " dist" ]
9
+ workTemp : [ " dest/work/cola" ]
10
+ dev : [ " dest/dev" ]
11
+ " core-widget" : [ " dist/cola-widget.js" ]
12
12
coffee :
13
13
dev :
14
14
options :
@@ -64,34 +64,21 @@ module.exports = (grunt) ->
64
64
libs :
65
65
expand : true
66
66
cwd : " src"
67
- src : [" lib/**" ]
67
+ src : [ " lib/**" ]
68
68
dest : " dest/dev"
69
69
70
70
semantic :
71
71
expand : true
72
72
cwd : " src/lib/semantic-ui"
73
- src : [" themes/**" , " semantic.css" , " semantic.js" ]
73
+ src : [ " themes/**" , " semantic.css" , " semantic.js" ]
74
74
dest : " dist"
75
75
76
76
apiResources :
77
77
expand : true
78
78
cwd : " node_modules/grunt-cola-ui-build"
79
- src : [" resources/**" ]
79
+ src : [ " resources/**" ]
80
80
dest : " api"
81
81
82
- mochaTest :
83
- test :
84
- options :
85
- mocha :
86
- ui : " qunit"
87
- reporter : " spec"
88
- src : [" test/mocha/*.js" ]
89
- qunit :
90
- all :
91
- options :
92
- urls : [
93
- " http://localhost:9001/test/qunit/all.html"
94
- ]
95
82
uglify :
96
83
options :
97
84
expand : true
@@ -111,24 +98,19 @@ module.exports = (grunt) ->
111
98
files : [
112
99
expand : true
113
100
cwd : " src"
114
- src : [" **/*.yaml" ]
101
+ src : [ " **/*.yaml" ]
115
102
dest : " api"
116
103
]
117
104
watch :
118
105
coffee :
119
- files : [" src/**/*.coffee" ]
106
+ files : [ " src/**/*.coffee" ]
120
107
tasks : " coffee:dev"
121
108
less :
122
- files : [" src/**/*.less" ]
109
+ files : [ " src/**/*.less" ]
123
110
tasks : " less:dev"
124
111
libs :
125
- files : [" src/lib/**" ]
112
+ files : [ " src/lib/**" ]
126
113
tasks : " copy:libs"
127
- connect :
128
- testServer :
129
- options :
130
- port : 9001
131
- base : " ."
132
114
yamlToDoc :
133
115
api :
134
116
options :
@@ -138,7 +120,7 @@ module.exports = (grunt) ->
138
120
{
139
121
expand : true
140
122
cwd : " src"
141
- src : [" **/*.yaml" ]
123
+ src : [ " **/*.yaml" ]
142
124
dest : " api"
143
125
}
144
126
]
@@ -153,7 +135,7 @@ module.exports = (grunt) ->
153
135
" cola-ui-license" :
154
136
options :
155
137
license : """
156
- /*! Colla - #{ pkg .version }
138
+ /*! Cola - #{ pkg .version }
157
139
* Copyright (C) 2015-2017 Benny Bao & Alex Tong.
158
140
* Licensed under the MIT license */
159
141
@@ -172,18 +154,18 @@ module.exports = (grunt) ->
172
154
" dist/3rd.js" : sources .lib .js
173
155
cola :
174
156
files :
175
- " dist/cola.js" : [" dist/cola-core.js" , " dist/cola-widget.js" ]
157
+ " dist/cola.js" : [ " dist/cola-core.js" , " dist/cola-widget.js" ]
176
158
all :
177
159
files :
178
- " dist/all/javascript.js" : [" dist/3rd.js" , " dist/semantic.js" , " dist/cola.js" ]
179
- " dist/all/css.js" : [" dist/semantic.css" , " dist/cola.css" ]
160
+ " dist/all/javascript.js" : [ " dist/3rd.js" , " dist/semantic.js" , " dist/cola.js" ]
161
+ " dist/all/css.js" : [ " dist/semantic.css" , " dist/cola.css" ]
180
162
cssmin :
181
163
target :
182
164
files : [
183
165
{
184
166
expand : true
185
167
cwd : " dist"
186
- src : [" cola.css" , " semantic.css" ]
168
+ src : [ " cola.css" , " semantic.css" ]
187
169
dest : " dist"
188
170
ext : " .min.css"
189
171
}
@@ -226,34 +208,36 @@ module.exports = (grunt) ->
226
208
227
209
grunt .loadNpmTasks " grunt-contrib-coffee"
228
210
grunt .loadNpmTasks " grunt-contrib-less"
229
- grunt .loadNpmTasks " grunt-mocha-test"
230
- grunt .loadNpmTasks " grunt-contrib-qunit"
231
211
grunt .loadNpmTasks " grunt-contrib-uglify"
232
212
grunt .loadNpmTasks " grunt-yaml"
233
213
grunt .loadNpmTasks " grunt-contrib-watch"
234
214
grunt .loadNpmTasks " grunt-contrib-copy"
235
215
grunt .loadNpmTasks " grunt-contrib-clean"
236
- grunt .loadNpmTasks " grunt-contrib-connect"
237
216
grunt .loadNpmTasks " grunt-cola-ui-build"
238
217
grunt .loadNpmTasks " grunt-contrib-concat"
239
218
grunt .loadNpmTasks " grunt-contrib-rename"
240
219
grunt .loadNpmTasks " grunt-contrib-cssmin"
241
220
grunt .loadNpmTasks " grunt-contrib-compress"
242
221
243
- grunt .registerTask " mochaTask " , [" mochaTest " ]
244
- grunt .registerTask " qunitTask " , [" connect:testServer " , " qunit " ]
245
- grunt .registerTask " test " , [" mochaTask " , " qunitTask " ]
246
-
247
- grunt .registerTask " compile " , [" clean:dev " , " coffee:dev " , " less:dev " , " copy:libs " ]
248
- grunt . registerTask " api " , [ " yamlToDoc " , " copy:apiResources " ]
249
- grunt . registerTask " all " , [ " clean" , " coffee " , " less " , " mochaTest " , " uglify " , " copy " ]
250
- grunt . registerTask " w " , [ " watch " ]
251
- grunt . registerTask " build " , [ " clean:build " , " cola-ui-clean " , " coffee:cola-core " , " coffee:cola-widget" ,
222
+ grunt .registerTask " compile " , [ " clean:dev " , " coffee:dev " , " less:dev " , " copy:libs " ]
223
+ grunt .registerTask " api " , [ " yamlToDoc " , " copy:apiResources " ]
224
+ grunt .registerTask " all " , [ " clean " , " coffee " , " less " , " uglify " , " copy " ]
225
+ grunt . registerTask " w " , [ " watch " ]
226
+ grunt .registerTask " build " , [
227
+ " clean:build " ,
228
+ " cola-ui- clean" ,
229
+ " coffee:cola-core " ,
230
+ " coffee:cola-widget" ,
252
231
" coffee:i18n" ,
253
- " less:build" , " cola-ui-license" , " concat:3rd-core" , " concat:3rd" , " concat:cola" ,
254
- " clean:core-widget" , " copy:semantic" ,
232
+ " less:build" ,
233
+ " cola-ui-license" ,
234
+ " concat:3rd-core" ,
235
+ " concat:3rd" ,
236
+ " concat:cola" ,
237
+ " clean:core-widget" ,
238
+ " copy:semantic" ,
255
239
" uglify:build" ,
256
240
" cssmin" ,
257
- # "compress",
258
- " clean:workTemp" ]
259
- grunt .registerTask " concat-all" , [" build" , " concat:all" ]
241
+ # "compress",
242
+ " clean:workTemp" ]
243
+ grunt .registerTask " concat-all" , [ " build" , " concat:all" ]
0 commit comments