@@ -187,37 +187,6 @@ grunt.registerTask( "build-index", function() {
187
187
} ) ;
188
188
}
189
189
190
- function getColorData ( ) {
191
- var files = grunt . file . expandFiles ( "cdn/color/*.js" ) ,
192
- releases = parseReleases ( files ,
193
- / ( c o l o r \/ j q u e r y .c o l o r - ( \d + \. \d + (?: \. \d + ) ? [ ^ . ] * ) (?: \. ( m i n ) ) ? \. j s ) / ) ,
194
- modes = [ "svg-names" , "plus-names" ] ;
195
-
196
- function addTypes ( release ) {
197
- release . minified = release . filename . replace ( ".js" , ".min.js" ) ;
198
-
199
- modes . forEach ( function ( mode ) {
200
- var filename = release . filename . replace ( "jquery.color" , "jquery.color." + mode ) ,
201
- minFilename = filename . replace ( ".js" , ".min.js" ) ;
202
-
203
- if ( files . indexOf ( "cdn/" + filename ) !== - 1 ) {
204
- release [ camelCase ( mode ) ] = {
205
- filename : filename ,
206
- version : release . version ,
207
- minified : minFilename
208
- } ;
209
- }
210
- } ) ;
211
- }
212
-
213
- releases . forEach ( addTypes ) ;
214
-
215
- return {
216
- latestStable : getLatestStable ( releases ) ,
217
- all : releases
218
- } ;
219
- }
220
-
221
190
function getMobileData ( ) {
222
191
var files = grunt . file . expandFiles ( "cdn/mobile/*/*.css" ) ,
223
192
releases = files . map ( function ( file ) {
@@ -265,6 +234,37 @@ grunt.registerTask( "build-index", function() {
265
234
} ;
266
235
}
267
236
237
+ function getColorData ( ) {
238
+ var files = grunt . file . expandFiles ( "cdn/color/*.js" ) ,
239
+ releases = parseReleases ( files ,
240
+ / ( c o l o r \/ j q u e r y .c o l o r - ( \d + \. \d + (?: \. \d + ) ? [ ^ . ] * ) (?: \. ( m i n ) ) ? \. j s ) / ) ,
241
+ modes = [ "svg-names" , "plus-names" ] ;
242
+
243
+ function addTypes ( release ) {
244
+ release . minified = release . filename . replace ( ".js" , ".min.js" ) ;
245
+
246
+ modes . forEach ( function ( mode ) {
247
+ var filename = release . filename . replace ( "jquery.color" , "jquery.color." + mode ) ,
248
+ minFilename = filename . replace ( ".js" , ".min.js" ) ;
249
+
250
+ if ( files . indexOf ( "cdn/" + filename ) !== - 1 ) {
251
+ release [ camelCase ( mode ) ] = {
252
+ filename : filename ,
253
+ version : release . version ,
254
+ minified : minFilename
255
+ } ;
256
+ }
257
+ } ) ;
258
+ }
259
+
260
+ releases . forEach ( addTypes ) ;
261
+
262
+ return {
263
+ latestStable : getLatestStable ( releases ) ,
264
+ all : releases
265
+ } ;
266
+ }
267
+
268
268
function getQunitData ( ) {
269
269
var files = grunt . file . expandFiles ( "cdn/qunit/*.js" ) ,
270
270
releases = parseReleases ( files ,
@@ -321,8 +321,8 @@ grunt.registerTask( "build-index", function() {
321
321
322
322
var data = getCoreData ( ) ;
323
323
data . ui = getUiData ( ) ,
324
- data . color = getColorData ( ) ;
325
324
data . mobile = getMobileData ( ) ;
325
+ data . color = getColorData ( ) ;
326
326
data . qunit = getQunitData ( ) ;
327
327
328
328
grunt . file . write ( "dist/wordpress/posts/page/index.html" ,
@@ -334,12 +334,12 @@ grunt.registerTask( "build-index", function() {
334
334
grunt . file . write ( "dist/wordpress/posts/page/ui.html" ,
335
335
Handlebars . compile ( grunt . file . read ( "templates/ui.hbs" ) ) ( data ) ) ;
336
336
337
- grunt . file . write ( "dist/wordpress/posts/page/color.html" ,
338
- Handlebars . compile ( grunt . file . read ( "templates/color.hbs" ) ) ( data ) ) ;
339
-
340
337
grunt . file . write ( "dist/wordpress/posts/page/mobile.html" ,
341
338
Handlebars . compile ( grunt . file . read ( "templates/mobile.hbs" ) ) ( data ) ) ;
342
339
340
+ grunt . file . write ( "dist/wordpress/posts/page/color.html" ,
341
+ Handlebars . compile ( grunt . file . read ( "templates/color.hbs" ) ) ( data ) ) ;
342
+
343
343
grunt . file . write ( "dist/wordpress/posts/page/qunit.html" ,
344
344
Handlebars . compile ( grunt . file . read ( "templates/qunit.hbs" ) ) ( data ) ) ;
345
345
} ) ;
0 commit comments