From c136c3529c7af31d9db01f7764d232e8020ff52e Mon Sep 17 00:00:00 2001 From: "Irsyad A. Panjaitan" Date: Sat, 24 Feb 2024 18:46:01 +0700 Subject: [PATCH] :feat --- generate-declarations.js | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/generate-declarations.js b/generate-declarations.js index 9efc5714..17935f34 100644 --- a/generate-declarations.js +++ b/generate-declarations.js @@ -1,8 +1,8 @@ const fs = require("fs"); const path = require("path"); -const iconsDir = path.join(__dirname, "src"); // Path to your icons -const outputDir = path.join(__dirname, "dist"); // Output directory +const iconsDir = path.join(__dirname, "src"); +const outputDir = path.join(__dirname, "dist"); const outputFile = path.join(outputDir, "index.d.ts"); fs.readdir(iconsDir, (err, files) => { @@ -12,14 +12,14 @@ fs.readdir(iconsDir, (err, files) => { } const exports = files - .filter((file) => file.endsWith(".js")) // Adjust the extension if needed - .map((file) => { - const iconName = path.basename(file, ".js"); // Remove file extension + .filter(file => file.endsWith(".js")) + .map(file => { + const iconName = path.basename(file, ".js"); return `export declare const ${iconName}: React.FC>;`; }); if (!fs.existsSync(outputDir)) { - fs.mkdirSync(outputDir); + fs.mkdirSync(outputDir, { recursive: true }); } const content = ["import React from 'react';", ...exports].join("\n"); diff --git a/package.json b/package.json index ffb9b88d..3f781499 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@irsyadadl/paranoid", - "version": "0.11.14", + "version": "1.0.0", "description": "A library of beautifully crafted react icons, perfect for enhancing the visual appeal and user experience of your web applications.", "author": "Irsyad A. Panjaitan", "license": "MIT",