build: Add process-svgs script (#216)

This commit is contained in:
Cole Bemis
2017-11-13 08:13:11 -08:00
committed by GitHub
parent f2b7e1f313
commit 0dc2bf5c9d
249 changed files with 5198 additions and 890 deletions

View File

@ -0,0 +1,11 @@
{
"xmlns": "http://www.w3.org/2000/svg",
"width": 24,
"height": 24,
"viewBox": "0 0 24 24",
"fill": "none",
"stroke": "currentColor",
"stroke-width": 2,
"stroke-linecap": "round",
"stroke-linejoin": "round"
}

View File

@ -3,18 +3,7 @@
*/
import icons from '../dist/icons.json';
const DEFAULT_OPTIONS = {
xmlns: 'http://www.w3.org/2000/svg',
width: 24,
height: 24,
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
'stroke-width': 2,
'stroke-linecap': 'round',
'stroke-linejoin': 'round',
};
import DEFAULT_ATTRIBUTES from './default-attributes.json';
/**
* Create an SVG string.
@ -31,7 +20,7 @@ export default function toSvg(key, options = {}) {
throw new Error(`No icon matching '${key}'. See the complete list of icons at https://feathericons.com`);
}
const combinedOptions = Object.assign({}, DEFAULT_OPTIONS, options);
const combinedOptions = Object.assign({}, DEFAULT_ATTRIBUTES, options);
combinedOptions.class = addDefaultClassNames(combinedOptions.class, key);