Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
move all script into update-icons.sh
Browse files Browse the repository at this point in the history
Ignore util/ and update-icons.sh for bower
  • Loading branch information
dfreedm committed Nov 11, 2014
1 parent 70c805d commit f83c70b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 91 deletions.
6 changes: 5 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
"core-icon": "Polymer/core-icon#master",
"core-iconset-svg": "Polymer/core-iconset-svg#master",
"polymer": "Polymer/polymer#master"
}
},
"ignore": [
"util",
"update-icons.sh"
]
}
73 changes: 0 additions & 73 deletions util/compile-icon-sets.sh

This file was deleted.

17 changes: 1 addition & 16 deletions util/concat-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,8 @@ function transmogrify($, name) {
var node = $('svg');
// remove spacer rectangles
node.find('[fill=none]').remove();
// remove fill colors
node.find('[fill]').each(function() {
var e = $(this);
var color = e.attr('fill');
// some "white" nodes are extraneous
if (color === '#FFFFFF') {
e.remove();
} else {
e.removeAttr('fill');
}
});
// remove adobe "save for web" elements
node.find('sfw, metadata').remove();
// remove empty groups
var innerHTML = $.xml(node.find('*').filter(':not(g)'));
// remove extraneous whitespace
innerHTML = innerHTML.replace(/\t|\r|\n/g, '');
var innerHTML = $.xml(node.children());
// add parent group with icon name as id
var output = '<g id="' + name + '">' + innerHTML + '</g>';
// print icon svg
Expand Down
2 changes: 1 addition & 1 deletion util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description": "",
"main": "concat-svg.js",
"dependencies": {
"cheerio": "^0.15.0"
"cheerio": "^0.17.0"
}
}

0 comments on commit f83c70b

Please sign in to comment.