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

Commit f83c70b

Browse files
committed
move all script into update-icons.sh
Ignore util/ and update-icons.sh for bower
1 parent 70c805d commit f83c70b

File tree

4 files changed

+7
-91
lines changed

4 files changed

+7
-91
lines changed

bower.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@
55
"core-icon": "Polymer/core-icon#master",
66
"core-iconset-svg": "Polymer/core-iconset-svg#master",
77
"polymer": "Polymer/polymer#master"
8-
}
8+
},
9+
"ignore": [
10+
"util",
11+
"update-icons.sh"
12+
]
913
}

util/compile-icon-sets.sh

-73
This file was deleted.

util/concat-svg.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,8 @@ function transmogrify($, name) {
2525
var node = $('svg');
2626
// remove spacer rectangles
2727
node.find('[fill=none]').remove();
28-
// remove fill colors
29-
node.find('[fill]').each(function() {
30-
var e = $(this);
31-
var color = e.attr('fill');
32-
// some "white" nodes are extraneous
33-
if (color === '#FFFFFF') {
34-
e.remove();
35-
} else {
36-
e.removeAttr('fill');
37-
}
38-
});
39-
// remove adobe "save for web" elements
40-
node.find('sfw, metadata').remove();
4128
// remove empty groups
42-
var innerHTML = $.xml(node.find('*').filter(':not(g)'));
43-
// remove extraneous whitespace
44-
innerHTML = innerHTML.replace(/\t|\r|\n/g, '');
29+
var innerHTML = $.xml(node.children());
4530
// add parent group with icon name as id
4631
var output = '<g id="' + name + '">' + innerHTML + '</g>';
4732
// print icon svg

util/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"description": "",
55
"main": "concat-svg.js",
66
"dependencies": {
7-
"cheerio": "^0.15.0"
7+
"cheerio": "^0.17.0"
88
}
99
}

0 commit comments

Comments
 (0)