@@ -244,6 +244,27 @@ grunt.registerTask( "build-index", function() {
244244 } ;
245245 }
246246
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+
247268 Handlebars . registerHelper ( "release" , function ( prefix , release ) {
248269 var html = prefix + " " + release . version + " - " +
249270 "<a href='/" + release . filename + "'>uncompressed</a>" ;
@@ -288,6 +309,7 @@ grunt.registerTask( "build-index", function() {
288309 data . mobile = getMobileData ( ) ;
289310 data . color = getColorData ( ) ;
290311 data . qunit = getQunitData ( ) ;
312+ data . pep = getPepData ( ) ;
291313
292314 grunt . file . write ( "dist/wordpress/posts/page/index.html" ,
293315 Handlebars . compile ( grunt . file . read ( "templates/index.hbs" ) ) ( data ) ) ;
@@ -306,12 +328,15 @@ grunt.registerTask( "build-index", function() {
306328
307329 grunt . file . write ( "dist/wordpress/posts/page/qunit.html" ,
308330 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 ) ) ;
309334} ) ;
310335
311336grunt . registerTask ( "reload-listings" , function ( ) {
312337 var done = this . async ( ) ,
313338 host = "http://" + grunt . config ( "wordpress" ) . url ,
314- paths = [ "/" , "/jquery/" , "/ui/" , "/mobile/" , "/color/" , "/qunit/" ] ,
339+ paths = [ "/" , "/jquery/" , "/ui/" , "/mobile/" , "/color/" , "/qunit/" , "/pep/" ] ,
315340 waiting = paths . length ;
316341
317342 paths . forEach ( function ( path ) {
0 commit comments