@@ -244,6 +244,27 @@ grunt.registerTask( "build-index", function() {
244
244
} ;
245
245
}
246
246
247
+ function getPepData ( ) {
248
+ var releases = grunt . file . expand ( { filter : "isDirectory" } , "cdn/pep/*" )
249
+ . map ( function ( dir ) {
250
+ var filename = dir . substring ( 4 ) + "/pep.js" ;
251
+
252
+ return {
253
+ filename : filename ,
254
+ version : dir . substring ( 8 ) ,
255
+ minified : filename . replace ( ".js" , ".min.js" )
256
+ } ;
257
+ } )
258
+ . sort ( function ( a , b ) {
259
+ return semver . compare ( b . version , a . version ) ;
260
+ } ) ;
261
+
262
+ return {
263
+ latestStable : getLatestStable ( releases ) ,
264
+ all : releases
265
+ } ;
266
+ }
267
+
247
268
Handlebars . registerHelper ( "release" , function ( prefix , release ) {
248
269
var html = prefix + " " + release . version + " - " +
249
270
"<a href='/" + release . filename + "'>uncompressed</a>" ;
@@ -288,6 +309,7 @@ grunt.registerTask( "build-index", function() {
288
309
data . mobile = getMobileData ( ) ;
289
310
data . color = getColorData ( ) ;
290
311
data . qunit = getQunitData ( ) ;
312
+ data . pep = getPepData ( ) ;
291
313
292
314
grunt . file . write ( "dist/wordpress/posts/page/index.html" ,
293
315
Handlebars . compile ( grunt . file . read ( "templates/index.hbs" ) ) ( data ) ) ;
@@ -306,12 +328,15 @@ grunt.registerTask( "build-index", function() {
306
328
307
329
grunt . file . write ( "dist/wordpress/posts/page/qunit.html" ,
308
330
Handlebars . compile ( grunt . file . read ( "templates/qunit.hbs" ) ) ( data ) ) ;
331
+
332
+ grunt . file . write ( "dist/wordpress/posts/page/pep.html" ,
333
+ Handlebars . compile ( grunt . file . read ( "templates/pep.hbs" ) ) ( data ) ) ;
309
334
} ) ;
310
335
311
336
grunt . registerTask ( "reload-listings" , function ( ) {
312
337
var done = this . async ( ) ,
313
338
host = "http://" + grunt . config ( "wordpress" ) . url ,
314
- paths = [ "/" , "/jquery/" , "/ui/" , "/mobile/" , "/color/" , "/qunit/" ] ,
339
+ paths = [ "/" , "/jquery/" , "/ui/" , "/mobile/" , "/color/" , "/qunit/" , "/pep/" ] ,
315
340
waiting = paths . length ;
316
341
317
342
paths . forEach ( function ( path ) {
0 commit comments