mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-18 06:07: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:
|
importers:
|
||||||
|
|
||||||
.:
|
.:
|
||||||
|
dependencies:
|
||||||
|
c12:
|
||||||
|
specifier: ^1.11.2
|
||||||
|
version: 1.11.2
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@html-eslint/eslint-plugin':
|
'@html-eslint/eslint-plugin':
|
||||||
specifier: ^0.19.1
|
specifier: ^0.19.1
|
||||||
@@ -5301,6 +5305,14 @@ packages:
|
|||||||
magicast:
|
magicast:
|
||||||
optional: true
|
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:
|
cac@6.7.14:
|
||||||
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
|
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
@@ -18355,6 +18367,21 @@ snapshots:
|
|||||||
pkg-types: 1.2.0
|
pkg-types: 1.2.0
|
||||||
rc9: 2.1.2
|
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: {}
|
cac@6.7.14: {}
|
||||||
|
|
||||||
cacache@15.3.0:
|
cacache@15.3.0:
|
||||||
@@ -21796,7 +21823,7 @@ snapshots:
|
|||||||
local-pkg@0.5.0:
|
local-pkg@0.5.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
mlly: 1.7.1
|
mlly: 1.7.1
|
||||||
pkg-types: 1.0.3
|
pkg-types: 1.2.0
|
||||||
|
|
||||||
locate-character@3.0.0: {}
|
locate-character@3.0.0: {}
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import path from 'path';
|
|||||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||||
import { toPascalCase, toCamelCase, resetFile, appendFile } from '@lucide/helpers';
|
import { toPascalCase, toCamelCase, resetFile, appendFile } from '@lucide/helpers';
|
||||||
|
|
||||||
export default (
|
export default function generateIndexFile (
|
||||||
inputEntry,
|
inputEntry,
|
||||||
outputDirectory,
|
outputDirectory,
|
||||||
iconNodes,
|
iconNodes,
|
||||||
exportModuleNameCasing,
|
exportModuleNameCasing,
|
||||||
iconFileExtension = '',
|
iconFileExtension = '',
|
||||||
) => {
|
) {
|
||||||
const fileName = path.basename(inputEntry);
|
const fileName = path.basename(inputEntry);
|
||||||
|
|
||||||
// Reset file
|
// Reset file
|
||||||
@@ -6,7 +6,7 @@ import getArgumentOptions from 'minimist';
|
|||||||
import { readSvgDirectory } from '@lucide/helpers';
|
import { readSvgDirectory } from '@lucide/helpers';
|
||||||
import renderIconsObject from './render/renderIconsObject.mjs';
|
import renderIconsObject from './render/renderIconsObject.mjs';
|
||||||
import generateIconFiles from './building/generateIconFiles.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';
|
import generateAliasesFile from './building/generateAliasesFile.mjs';
|
||||||
// eslint-disable-next-line import/no-named-as-default, import/no-named-as-default-member
|
// 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
|
// Generates entry files for the compiler filled with icons exports
|
||||||
generateExportsFile(
|
generateIndexFile(
|
||||||
path.join(OUTPUT_DIR, 'icons', exportFileName),
|
path.join(OUTPUT_DIR, 'icons', exportFileName),
|
||||||
path.join(OUTPUT_DIR, 'icons'),
|
path.join(OUTPUT_DIR, 'icons'),
|
||||||
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