@@ -125,7 +125,7 @@ function getLatestStable( organized ) {
125
125
var rjQueryVersion = / ( j q u e r y - ( \d + \. \d + (?: \. \d + ) ? [ ^ . ] * ) (?: \. ( m i n | p a c k ) ) ? \. j s ) / ;
126
126
var rjQueryMigrateVersion = / ( j q u e r y - m i g r a t e - ( \d + \. \d + (?: \. \d + ) ? [ ^ . ] * ) (?: \. m i n ) ? \. j s ) / ;
127
127
grunt . registerTask ( "build-index" , function ( ) {
128
- var mainIndex , projectIndex , latestStable ,
128
+ var mainIndex , projectIndex , latestStable , gitListing ,
129
129
files = grunt . file . expandFiles ( "cdn/**.js" ) ,
130
130
jQueryCoreFiles = parseFiles ( files , rjQueryVersion ) ,
131
131
jQueryMigrateFiles = parseFiles ( files , rjQueryMigrateVersion ) ,
@@ -153,13 +153,15 @@ grunt.registerTask( "build-index", function() {
153
153
mainIndex += listItem ( "jQuery Core" , latestStable , jQuery1 [ latestStable ] ) ;
154
154
mainIndex += "</ul>" ;
155
155
156
- mainIndex += "<h3>jQuery - Live git versions</h3>" ;
157
- mainIndex += "<p>UNSTABLE, NOT FOR PRODUCTION</p>" ;
158
- mainIndex += "<ul>" ;
159
- mainIndex += "<li><a href='/jquery-git2.js'>jQuery 2.x git build</a> - <a href='/jquery-git2.min.js'>minified</a></li>" ;
160
- mainIndex += "<li><a href='/jquery-git1.js'>jQuery 1.x git build</a> - <a href='/jquery-git1.min.js'>minified</a></li>" ;
161
- mainIndex += "<li><a href='/jquery-migrate-git.js'>jQuery Migrate git build</a> - <a href='/jquery-migrate-git.min.js'>minified</a></li>" ;
162
- mainIndex += "</ul>" ;
156
+ gitListing = "<h3>jQuery - Live git versions</h3>" ;
157
+ gitListing += "<p>UNSTABLE, NOT FOR PRODUCTION</p>" ;
158
+ gitListing += "<ul>" ;
159
+ gitListing += "<li><a href='/jquery-git2.js'>jQuery 2.x git build</a> - <a href='/jquery-git2.min.js'>minified</a></li>" ;
160
+ gitListing += "<li><a href='/jquery-git1.js'>jQuery 1.x git build</a> - <a href='/jquery-git1.min.js'>minified</a></li>" ;
161
+ gitListing += "<li><a href='/jquery-migrate-git.js'>jQuery Migrate git build</a> - <a href='/jquery-migrate-git.min.js'>minified</a></li>" ;
162
+ gitListing += "</ul>" ;
163
+
164
+ mainIndex += gitListing ;
163
165
164
166
latestStable = getLatestStable ( jQueryMigrate ) ;
165
167
mainIndex += "<h3>jQuery Migrate - Latest Version</h3>" ;
@@ -170,13 +172,7 @@ grunt.registerTask( "build-index", function() {
170
172
171
173
// Build /jquery/
172
174
projectIndex = "<script>{\"title\":\"jQuery Core - All Versions\"}</script>\n" ;
173
- projectIndex += "<h3>jQuery - Live git versions</h3>" ;
174
- projectIndex += "<p>UNSTABLE, NOT FOR PRODUCTION</p>" ;
175
- projectIndex += "<ul>" ;
176
- projectIndex += "<li><a href='/jquery-git2.js'>jQuery 2.x git build</a> - <a href='/jquery-git2.min.js'>min</a></li>" ;
177
- projectIndex += "<li><a href='/jquery-git1.js'>jQuery 1.x git build</a> - <a href='/jquery-git1.min.js'>min</a></li>" ;
178
- projectIndex += "<li><a href='/jquery-migrate-git.js'>jQuery Migrate git build</a> - <a href='/jquery-migrate-git.min.js'>min</a></li>" ;
179
- projectIndex += "</ul>" ;
175
+ projectIndex += gitListing ;
180
176
181
177
projectIndex += "<h2>jQuery Core - All 2.x Versions</h2>" ;
182
178
projectIndex += "<ul>" ;
0 commit comments