mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-17 07:17:41 +01:00
Compare commits
1 Commits
version-se
...
build-conf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
291b016d45 |
@@ -75,5 +75,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"c12": "^1.11.2"
|
||||
}
|
||||
}
|
||||
|
||||
12
packages/lucide/build.config.ts
Normal file
12
packages/lucide/build.config.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { BuildConfig } from '@lucide/build-icons/types/config'
|
||||
|
||||
export default {
|
||||
output: './src ',
|
||||
templateSrc: './scripts/exportTemplate.mjs',
|
||||
iconFileExtension: '.ts',
|
||||
aliases: {
|
||||
exportNamesOnly: true,
|
||||
fileExtension: '.ts',
|
||||
},
|
||||
indexFileName: 'index.ts'
|
||||
} satisfies BuildConfig;
|
||||
29
pnpm-lock.yaml
generated
29
pnpm-lock.yaml
generated
@@ -9,6 +9,10 @@ packageExtensionsChecksum: ec9ef8c1f59f2012c5f48437186d43d8
|
||||
importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
c12:
|
||||
specifier: ^1.11.2
|
||||
version: 1.11.2
|
||||
devDependencies:
|
||||
'@html-eslint/eslint-plugin':
|
||||
specifier: ^0.19.1
|
||||
@@ -5301,6 +5305,14 @@ packages:
|
||||
magicast:
|
||||
optional: true
|
||||
|
||||
c12@1.11.2:
|
||||
resolution: {integrity: sha512-oBs8a4uvSDO9dm8b7OCFW7+dgtVrwmwnrVXYzLm43ta7ep2jCn/0MhoUFygIWtxhyy6+/MG7/agvpY0U1Iemew==}
|
||||
peerDependencies:
|
||||
magicast: ^0.3.4
|
||||
peerDependenciesMeta:
|
||||
magicast:
|
||||
optional: true
|
||||
|
||||
cac@6.7.14:
|
||||
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -18355,6 +18367,21 @@ snapshots:
|
||||
pkg-types: 1.2.0
|
||||
rc9: 2.1.2
|
||||
|
||||
c12@1.11.2:
|
||||
dependencies:
|
||||
chokidar: 3.6.0
|
||||
confbox: 0.1.7
|
||||
defu: 6.1.4
|
||||
dotenv: 16.4.5
|
||||
giget: 1.2.3
|
||||
jiti: 1.21.6
|
||||
mlly: 1.7.1
|
||||
ohash: 1.1.3
|
||||
pathe: 1.1.2
|
||||
perfect-debounce: 1.0.0
|
||||
pkg-types: 1.2.0
|
||||
rc9: 2.1.2
|
||||
|
||||
cac@6.7.14: {}
|
||||
|
||||
cacache@15.3.0:
|
||||
@@ -21796,7 +21823,7 @@ snapshots:
|
||||
local-pkg@0.5.0:
|
||||
dependencies:
|
||||
mlly: 1.7.1
|
||||
pkg-types: 1.0.3
|
||||
pkg-types: 1.2.0
|
||||
|
||||
locate-character@3.0.0: {}
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { toPascalCase, toCamelCase, resetFile, appendFile } from '@lucide/helpers';
|
||||
|
||||
export default (
|
||||
export default function generateIndexFile (
|
||||
inputEntry,
|
||||
outputDirectory,
|
||||
iconNodes,
|
||||
exportModuleNameCasing,
|
||||
iconFileExtension = '',
|
||||
) => {
|
||||
) {
|
||||
const fileName = path.basename(inputEntry);
|
||||
|
||||
// Reset file
|
||||
@@ -6,7 +6,7 @@ import getArgumentOptions from 'minimist';
|
||||
import { readSvgDirectory } from '@lucide/helpers';
|
||||
import renderIconsObject from './render/renderIconsObject.mjs';
|
||||
import generateIconFiles from './building/generateIconFiles.mjs';
|
||||
import generateExportsFile from './building/generateExportsFile.mjs';
|
||||
import generateIndexFile from './building/generateIndexFile.mjs';
|
||||
|
||||
import generateAliasesFile from './building/generateAliasesFile.mjs';
|
||||
// eslint-disable-next-line import/no-named-as-default, import/no-named-as-default-member
|
||||
@@ -89,7 +89,7 @@ async function buildIcons() {
|
||||
}
|
||||
|
||||
// Generates entry files for the compiler filled with icons exports
|
||||
generateExportsFile(
|
||||
generateIndexFile(
|
||||
path.join(OUTPUT_DIR, 'icons', exportFileName),
|
||||
path.join(OUTPUT_DIR, 'icons'),
|
||||
icons,
|
||||
|
||||
12
tools/build-icons/types/config.d.ts
vendored
Normal file
12
tools/build-icons/types/config.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
interface AliasConfig {
|
||||
exportNamesOnly: boolean,
|
||||
fileExtension: string
|
||||
}
|
||||
|
||||
export interface BuildConfig {
|
||||
output: string
|
||||
templateSrc: string
|
||||
iconFileExtension?: string
|
||||
aliases?: AliasConfig | boolean
|
||||
indexFileName?: string
|
||||
}
|
||||
Reference in New Issue
Block a user