mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-12-04 17:09:07 +00:00
Add build scripts for dist
This commit is contained in:
@@ -3,12 +3,17 @@ import path from 'path';
|
||||
import prettier from 'prettier';
|
||||
import { generateComponentName } from './helpers';
|
||||
|
||||
export default function(iconVNodesObject) {
|
||||
export default function(iconVNodesObject, outputDirectory) {
|
||||
|
||||
const icons = Object.keys(iconVNodesObject);
|
||||
const iconsDistDirectory = path.join(outputDirectory, `icons`);
|
||||
|
||||
if (!fs.existsSync(iconsDistDirectory)){
|
||||
fs.mkdirSync(iconsDistDirectory);
|
||||
}
|
||||
|
||||
icons.forEach(icon => {
|
||||
const location = path.join(process.cwd(), "src/icons", `${icon}.js`);
|
||||
const location = path.join(iconsDistDirectory, `${icon}.js`);
|
||||
const ComponentName = generateComponentName(icon);
|
||||
|
||||
const VNode = JSON.stringify(iconVNodesObject[icon]);
|
||||
|
||||
Reference in New Issue
Block a user