mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-15 14:08:49 +00:00
Implement: Typescript, Esbuild and vitest (#877)
* init modernization * implement esbuild * Make first build work * Fix esbuild for lucide-react * Add vitest for lucide-react * add esbuild lucide and lucide-react * update package lock * implement preact * Add typescript and vitest * adjust workflows * Fix mocking react-native package * update lock file * Add esbuild in svelte * make svelte test work in vitest * Refactor lucide svelte * Transform lucide vue to typescript * Finish lucide-vue-next typescript * 0.104.0-beta.0 * remove version in main package.json * cleanup * Fix svelte tests snapshots * clean up * add rollup lucide-vue-next * Fix lucide svelte package * change to workspace link * revert filter position * revert preact workflow change * cleanup * Fix some types * add semi
This commit is contained in:
@@ -23,7 +23,7 @@ const {
|
||||
renderUniqueKey = false,
|
||||
templateSrc,
|
||||
silent = false,
|
||||
iconFileExtention = '.js',
|
||||
iconFileExtension = '.js',
|
||||
exportFileName = 'index.js',
|
||||
pretty = true,
|
||||
} = cliArguments;
|
||||
@@ -45,7 +45,7 @@ async function buildIcons() {
|
||||
outputDirectory: OUTPUT_DIR,
|
||||
template: iconFileTemplate,
|
||||
showLog: !silent,
|
||||
iconFileExtention,
|
||||
iconFileExtension,
|
||||
pretty: JSON.parse(pretty),
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@ async function buildIcons() {
|
||||
path.join(OUTPUT_DIR, 'icons', exportFileName),
|
||||
path.join(OUTPUT_DIR, 'icons'),
|
||||
icons,
|
||||
iconFileExtention,
|
||||
iconFileExtension,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import path from 'path';
|
||||
|
||||
import { toPascalCase, resetFile, appendFile } from '../helpers.mjs';
|
||||
|
||||
export default (inputEntry, outputDirectory, iconNodes, iconFileExtention = '') => {
|
||||
export default (inputEntry, outputDirectory, iconNodes, iconFileExtension = '') => {
|
||||
const fileName = path.basename(inputEntry);
|
||||
|
||||
// Reset file
|
||||
@@ -11,7 +11,7 @@ export default (inputEntry, outputDirectory, iconNodes, iconFileExtention = '')
|
||||
const icons = Object.keys(iconNodes);
|
||||
|
||||
const fileExtention =
|
||||
iconFileExtention === '.ts' || iconFileExtention === '.js' ? '' : iconFileExtention;
|
||||
iconFileExtension === '.ts' || iconFileExtension === '.js' ? '' : iconFileExtension;
|
||||
|
||||
// Generate Import for Icon VNodes
|
||||
icons.forEach((iconName) => {
|
||||
|
||||
@@ -8,7 +8,7 @@ export default ({
|
||||
outputDirectory,
|
||||
template,
|
||||
showLog = true,
|
||||
iconFileExtention = '.js',
|
||||
iconFileExtension = '.js',
|
||||
pretty = true,
|
||||
}) => {
|
||||
const icons = Object.keys(iconNodes);
|
||||
@@ -19,7 +19,7 @@ export default ({
|
||||
}
|
||||
|
||||
const writeIconFiles = icons.map(async (iconName) => {
|
||||
const location = path.join(iconsDistDirectory, `${iconName}${iconFileExtention}`);
|
||||
const location = path.join(iconsDistDirectory, `${iconName}${iconFileExtension}`);
|
||||
const componentName = toPascalCase(iconName);
|
||||
|
||||
let { children } = iconNodes[iconName];
|
||||
|
||||
Reference in New Issue
Block a user