mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 14:27:42 +01:00
* Adjust typescript types * adjust types * fix types in all helper files * Fix types * Migrate js files to ts files * Refactor to TS files * Rename extentions * Adjust imports * Fix builds * Update lockfile * Fix last typescript migration * Fix entry path @lucide/outline-svg * Fix types * add checkout step * format files * Format files
30 lines
755 B
TypeScript
30 lines
755 B
TypeScript
import { promises as fs } from 'fs';
|
|
import SVGFixer from 'oslllo-svg-fixer';
|
|
import getArgumentOptions from 'minimist';
|
|
import path from 'path';
|
|
|
|
const inputDir = path.join(process.cwd(), '../../icons');
|
|
const cliArguments = getArgumentOptions(process.argv.slice(2));
|
|
const { outputDir = 'outlined' } = cliArguments;
|
|
const targetDir = path.join(process.cwd(), '../../', outputDir);
|
|
|
|
async function init() {
|
|
console.time('icon outliner');
|
|
try {
|
|
try {
|
|
await fs.mkdir(targetDir);
|
|
} catch (error) {} // eslint-disable-line no-empty
|
|
|
|
await SVGFixer(inputDir, targetDir, {
|
|
showProgressBar: true,
|
|
traceResolution: 800,
|
|
}).fix();
|
|
|
|
console.timeEnd('icon outliner');
|
|
} catch (err) {
|
|
console.log(err);
|
|
}
|
|
}
|
|
|
|
init();
|