build-svgs.js 325 Bytes
Newer Older
1 2
import fs from 'fs';
import path from 'path';
Cole Bemis's avatar
Cole Bemis committed
3 4 5 6
import icons from '../src/icons';

const OUT_DIR = path.resolve(__dirname, '../dist/icons');

Cole Bemis's avatar
Cole Bemis committed
7
console.log(`Building SVGs in ${OUT_DIR}...`);
8

Cole Bemis's avatar
Cole Bemis committed
9 10
Object.keys(icons).forEach(name => {
  const svg = icons[name].toSvg();
11

Cole Bemis's avatar
Cole Bemis committed
12
  fs.writeFileSync(path.join(OUT_DIR, `${name}.svg`), svg);
13
});