mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
19 lines
452 B
JavaScript
19 lines
452 B
JavaScript
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
import processSvg from './process-svg';
|
|
|
|
const IN_DIR = path.resolve(__dirname, '../icons');
|
|
|
|
console.log(`Processing SVGs in ${IN_DIR}...`);
|
|
|
|
fs
|
|
.readdirSync(IN_DIR)
|
|
.filter(file => path.extname(file) === '.svg')
|
|
.forEach(svgFile => {
|
|
const svg = fs.readFileSync(path.join(IN_DIR, svgFile));
|
|
processSvg(svg).then(svg =>
|
|
fs.writeFileSync(path.join(IN_DIR, svgFile), svg),
|
|
);
|
|
});
|