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:
Eric Fennis
2022-12-04 22:38:56 +01:00
committed by GitHub
parent 4a2c6ed8b0
commit fa6ed02297
134 changed files with 3664 additions and 4298 deletions
+3 -3
View File
@@ -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 -2
View File
@@ -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) => {
+2 -2
View File
@@ -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];