Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Commit

Permalink
Font icon class replacement tweaks.
Browse files Browse the repository at this point in the history
See #222
  • Loading branch information
GaryJones committed May 28, 2014
1 parent 1049f4c commit 5566acb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,13 @@ module.exports = function(grunt) {
patterns: [{
match: /\'@@fonticonclasses\'/,
replacement: function() {
grunt.log.ok( 'Replacing font icon classes in .js file' );
grunt.log.write( 'Replacing font icon classes placeholder in .js file' );
var icons = grunt.file.read( 'assets/bower/less/font-awesome/icons.less' );
// Get rid of stuff before class name
icons = icons.replace( /\.@\{fa-css-prefix\}/gm, '\t\t\t\'ft-ico' );
// Get rid of stuff after class name
icons = icons.replace( /:before.*$/gm, '\',' );
icons = icons.replace( /\/\*.*\*\//gm, '' );
// Get rid of leading comment and trailing comma
icons = icons.substring( icons.indexOf( '\'' ), icons.lastIndexOf( ',' ) );
return icons;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/forsitethemes/js/fontawesome-icon-selector-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@
$( iconSelectorElement ).data( 'FontAwesomeIconSelectorApp', true );
};

// The placeholder is replaced with the full list via the grunt replace:fonticons task
AdminApp.getFontAwesomeIcons = function() {
// The placeholder is replaced with the full list via the grunt replace:fonticons task
var iconModels, iconClasses = [
'@@fonticonclasses'
];
Expand Down
2 changes: 1 addition & 1 deletion theme/js/fontawesome-icon-selector-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@
$( iconSelectorElement ).data( 'FontAwesomeIconSelectorApp', true );
};

// The placeholder is replaced with the full list via the grunt replace:fonticons task
AdminApp.getFontAwesomeIcons = function() {
// The placeholder is replaced with the full list via the grunt replace:fonticons task
var iconModels, iconClasses = [
'ft-ico-glass',
'ft-ico-music',
Expand Down

0 comments on commit 5566acb

Please sign in to comment.