1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-01-17 20:58:34 +01:00
2023-01-22 00:02:47 +01:00

17 lines
501 B
JavaScript

import { exec } from 'child_process'
import { asyncForEach, readSvgs } from '../../.build/helpers.mjs'
let svgFiles = readSvgs()
await asyncForEach(svgFiles, async function(file, i) {
const distPath = `./icons/${file.name}.png`
process.stdout.write(`Building ${i}/${svgFiles.length}: ${file.name.padEnd(42)}\r`)
await new Promise((resolve, reject) => {
exec(`rsvg-convert -h 240 ${file.path} > ${distPath}`, (error, stdout, stderr) => {
error ? reject() : resolve()
})
})
})