Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 562dc82

Browse files
author
Gabriel Schulhof
committed
Build: Update references to grunticon paths
Closes gh-7202 Fixes gh-6941
1 parent ba6d684 commit 562dc82

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Gruntfile.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,26 @@ module.exports = function( grunt ) {
454454
// References to the icons CSS file need to be processed here
455455
content = content.replace( /css\/themes\/default\/jquery\.mobile\.icons\.css/gi,
456456
path.join( "..", "jquery.mobile.icons.min.css" ) );
457+
458+
// References to stylesheets via grunticon need to be updated
459+
content = content.replace( /(grunticon\( \[([^\]]*))/,
460+
function( match, group ) {
461+
var index,
462+
offset = group.indexOf( "[" ),
463+
prefix = group.substring( 0, offset + 1 );
464+
465+
group = group.substring( offset + 1 ).split( "," );
466+
467+
for ( index in group ) {
468+
group[ index ] = "\"" + group[ index ]
469+
.trim()
470+
.replace( /(^['"])|(['"]$)/g, "" )
471+
.replace( /\.\.\/css\//, "css/" )
472+
.replace( /\.css$/, ".min.css" ) + "\"";
473+
}
474+
475+
return prefix + " " + group.join( "," ) + " ";
476+
});
457477
return content;
458478
}
459479
},

0 commit comments

Comments
 (0)