vectify 2.0.5 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -13
- package/README.zh-CN.md +12 -13
- package/dist/{chunk-CIKTK6HI.mjs → chunk-FS34P27H.mjs} +8 -0
- package/dist/{chunk-GY4VNET5.mjs → chunk-QYE23M3E.mjs} +625 -65
- package/dist/cli.js +676 -117
- package/dist/cli.mjs +3 -3
- package/dist/{helpers-UPZEBRGK.mjs → helpers-ZOR3OD66.mjs} +1 -1
- package/dist/index.d.mts +33 -2
- package/dist/index.d.ts +33 -2
- package/dist/index.js +669 -110
- package/dist/index.mjs +2 -2
- package/dist/templates/angular/component.ts.hbs +11 -2
- package/dist/templates/angular/createIcon.ts.hbs +11 -2
- package/dist/templates/astro/component.astro.hbs +12 -2
- package/dist/templates/astro/createIcon.astro.hbs +12 -2
- package/dist/templates/lit/component.js.hbs +1 -0
- package/dist/templates/lit/component.ts.hbs +1 -0
- package/dist/templates/lit/createIcon.js.hbs +12 -2
- package/dist/templates/lit/createIcon.ts.hbs +12 -2
- package/dist/templates/preact/component.jsx.hbs +1 -1
- package/dist/templates/preact/component.tsx.hbs +1 -1
- package/dist/templates/preact/createIcon.jsx.hbs +12 -3
- package/dist/templates/preact/createIcon.tsx.hbs +13 -3
- package/dist/templates/qwik/component.jsx.hbs +1 -1
- package/dist/templates/qwik/component.tsx.hbs +1 -1
- package/dist/templates/qwik/createIcon.jsx.hbs +12 -3
- package/dist/templates/qwik/createIcon.tsx.hbs +13 -3
- package/dist/templates/react/component.jsx.hbs +1 -1
- package/dist/templates/react/component.tsx.hbs +1 -1
- package/dist/templates/react/createIcon.jsx.hbs +12 -3
- package/dist/templates/react/createIcon.tsx.hbs +13 -3
- package/dist/templates/solid/component.tsx.hbs +1 -1
- package/dist/templates/solid/createIcon.jsx.hbs +13 -3
- package/dist/templates/solid/createIcon.tsx.hbs +14 -3
- package/dist/templates/svelte/component.js.svelte.hbs +4 -1
- package/dist/templates/svelte/component.ts.svelte.hbs +4 -1
- package/dist/templates/svelte/icon.js.svelte.hbs +23 -2
- package/dist/templates/svelte/icon.ts.svelte.hbs +23 -2
- package/dist/templates/vanilla/component.ts.hbs +1 -1
- package/dist/templates/vanilla/createIcon.js.hbs +12 -3
- package/dist/templates/vanilla/createIcon.ts.hbs +13 -3
- package/dist/templates/vue/component.js.vue.hbs +5 -2
- package/dist/templates/vue/component.ts.vue.hbs +5 -2
- package/dist/templates/vue/icon.js.vue.hbs +26 -2
- package/dist/templates/vue/icon.ts.vue.hbs +26 -2
- package/dist/templates/vue2/component.js.vue.hbs +4 -2
- package/dist/templates/vue2/component.ts.vue.hbs +5 -2
- package/dist/templates/vue2/icon.js.vue.hbs +25 -2
- package/dist/templates/vue2/icon.ts.vue.hbs +25 -2
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
generate,
|
|
4
4
|
init,
|
|
5
5
|
watch
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-QYE23M3E.mjs";
|
|
7
|
+
import "./chunk-FS34P27H.mjs";
|
|
8
8
|
|
|
9
9
|
// src/cli.ts
|
|
10
10
|
import { readFileSync } from "fs";
|
|
@@ -34,7 +34,7 @@ program.command("init").description("Initialize a new configuration file").optio
|
|
|
34
34
|
process.exit(1);
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
program.command("generate").description("Generate icon components from SVG files").option("-c, --config <path>", "Path to config file").option("--dry-run", "Preview what will be generated without writing files").action(async (options) => {
|
|
37
|
+
program.command("generate").description("Generate icon components from SVG files").option("-c, --config <path>", "Path to config file").option("--dry-run", "Preview what will be generated without writing files").option("--force", "Force full regeneration, ignoring cache").action(async (options) => {
|
|
38
38
|
try {
|
|
39
39
|
await generate(options);
|
|
40
40
|
} catch (error) {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface GenerateOptions {
|
|
2
2
|
config?: string;
|
|
3
3
|
dryRun?: boolean;
|
|
4
|
+
force?: boolean;
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* Generate icon components
|
|
@@ -143,7 +144,7 @@ interface IconForgeConfig {
|
|
|
143
144
|
/**
|
|
144
145
|
* Custom name transformation function
|
|
145
146
|
*/
|
|
146
|
-
|
|
147
|
+
componentNameTransform?: (name: string) => string;
|
|
147
148
|
/**
|
|
148
149
|
* SVGO configuration
|
|
149
150
|
*/
|
|
@@ -177,6 +178,26 @@ interface IconForgeConfig {
|
|
|
177
178
|
*/
|
|
178
179
|
cleanOutput?: boolean;
|
|
179
180
|
};
|
|
181
|
+
/**
|
|
182
|
+
* Incremental generation settings
|
|
183
|
+
*/
|
|
184
|
+
incremental?: {
|
|
185
|
+
/**
|
|
186
|
+
* Enable incremental generation
|
|
187
|
+
* @default true
|
|
188
|
+
*/
|
|
189
|
+
enabled?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Cache directory name (relative to output)
|
|
192
|
+
* @default '.vectify'
|
|
193
|
+
*/
|
|
194
|
+
cacheDir?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Force full regeneration (ignore cache)
|
|
197
|
+
* @default false
|
|
198
|
+
*/
|
|
199
|
+
force?: boolean;
|
|
200
|
+
};
|
|
180
201
|
/**
|
|
181
202
|
* Watch mode settings
|
|
182
203
|
*/
|
|
@@ -195,6 +216,16 @@ interface IconForgeConfig {
|
|
|
195
216
|
* @default 300
|
|
196
217
|
*/
|
|
197
218
|
debounce?: number;
|
|
219
|
+
/**
|
|
220
|
+
* Minimum file size for valid SVG (in bytes)
|
|
221
|
+
* @default 20
|
|
222
|
+
*/
|
|
223
|
+
minFileSize?: number;
|
|
224
|
+
/**
|
|
225
|
+
* Delay before retrying empty file (in milliseconds)
|
|
226
|
+
* @default 2000
|
|
227
|
+
*/
|
|
228
|
+
emptyFileRetryDelay?: number;
|
|
198
229
|
};
|
|
199
230
|
/**
|
|
200
231
|
* Format generated files after generation
|
|
@@ -273,7 +304,7 @@ interface FrameworkStrategy {
|
|
|
273
304
|
/**
|
|
274
305
|
* Generate component code
|
|
275
306
|
*/
|
|
276
|
-
generateComponent: (componentName: string, iconNode: IconNode[], typescript: boolean, keepColors?: boolean) => string;
|
|
307
|
+
generateComponent: (componentName: string, iconNode: IconNode[], typescript: boolean, keepColors?: boolean, viewBox?: string) => string;
|
|
277
308
|
/**
|
|
278
309
|
* Generate base component (Icon/createIcon)
|
|
279
310
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface GenerateOptions {
|
|
2
2
|
config?: string;
|
|
3
3
|
dryRun?: boolean;
|
|
4
|
+
force?: boolean;
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* Generate icon components
|
|
@@ -143,7 +144,7 @@ interface IconForgeConfig {
|
|
|
143
144
|
/**
|
|
144
145
|
* Custom name transformation function
|
|
145
146
|
*/
|
|
146
|
-
|
|
147
|
+
componentNameTransform?: (name: string) => string;
|
|
147
148
|
/**
|
|
148
149
|
* SVGO configuration
|
|
149
150
|
*/
|
|
@@ -177,6 +178,26 @@ interface IconForgeConfig {
|
|
|
177
178
|
*/
|
|
178
179
|
cleanOutput?: boolean;
|
|
179
180
|
};
|
|
181
|
+
/**
|
|
182
|
+
* Incremental generation settings
|
|
183
|
+
*/
|
|
184
|
+
incremental?: {
|
|
185
|
+
/**
|
|
186
|
+
* Enable incremental generation
|
|
187
|
+
* @default true
|
|
188
|
+
*/
|
|
189
|
+
enabled?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Cache directory name (relative to output)
|
|
192
|
+
* @default '.vectify'
|
|
193
|
+
*/
|
|
194
|
+
cacheDir?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Force full regeneration (ignore cache)
|
|
197
|
+
* @default false
|
|
198
|
+
*/
|
|
199
|
+
force?: boolean;
|
|
200
|
+
};
|
|
180
201
|
/**
|
|
181
202
|
* Watch mode settings
|
|
182
203
|
*/
|
|
@@ -195,6 +216,16 @@ interface IconForgeConfig {
|
|
|
195
216
|
* @default 300
|
|
196
217
|
*/
|
|
197
218
|
debounce?: number;
|
|
219
|
+
/**
|
|
220
|
+
* Minimum file size for valid SVG (in bytes)
|
|
221
|
+
* @default 20
|
|
222
|
+
*/
|
|
223
|
+
minFileSize?: number;
|
|
224
|
+
/**
|
|
225
|
+
* Delay before retrying empty file (in milliseconds)
|
|
226
|
+
* @default 2000
|
|
227
|
+
*/
|
|
228
|
+
emptyFileRetryDelay?: number;
|
|
198
229
|
};
|
|
199
230
|
/**
|
|
200
231
|
* Format generated files after generation
|
|
@@ -273,7 +304,7 @@ interface FrameworkStrategy {
|
|
|
273
304
|
/**
|
|
274
305
|
* Generate component code
|
|
275
306
|
*/
|
|
276
|
-
generateComponent: (componentName: string, iconNode: IconNode[], typescript: boolean, keepColors?: boolean) => string;
|
|
307
|
+
generateComponent: (componentName: string, iconNode: IconNode[], typescript: boolean, keepColors?: boolean, viewBox?: string) => string;
|
|
277
308
|
/**
|
|
278
309
|
* Generate base component (Icon/createIcon)
|
|
279
310
|
*/
|