@vixt/cli 0.13.0 → 0.13.2
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/dist/index.d.mts +18 -4
- package/dist/index.mjs +10 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -533,10 +533,16 @@ declare const commands: {
|
|
|
533
533
|
};
|
|
534
534
|
//#endregion
|
|
535
535
|
//#region src/main.d.ts
|
|
536
|
+
declare const mainArgsDef: {
|
|
537
|
+
command: {
|
|
538
|
+
type: "positional";
|
|
539
|
+
required: true;
|
|
540
|
+
};
|
|
541
|
+
};
|
|
536
542
|
declare const main: import("citty").CommandDef<{
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
543
|
+
command: {
|
|
544
|
+
type: "positional";
|
|
545
|
+
required: true;
|
|
540
546
|
};
|
|
541
547
|
}>;
|
|
542
548
|
declare const vixtArgsDef: {
|
|
@@ -608,6 +614,10 @@ declare const vixtArgsDef: {
|
|
|
608
614
|
type: "boolean";
|
|
609
615
|
description: string;
|
|
610
616
|
};
|
|
617
|
+
command: {
|
|
618
|
+
type: "positional";
|
|
619
|
+
required: true;
|
|
620
|
+
};
|
|
611
621
|
};
|
|
612
622
|
type VixtArgs = ParsedArgs<typeof vixtArgsDef>;
|
|
613
623
|
type VixtCLIOptions = Partial<VixtArgs>;
|
|
@@ -680,6 +690,10 @@ declare function parseVixtArgs(args?: string[]): ParsedArgs<{
|
|
|
680
690
|
type: "boolean";
|
|
681
691
|
description: string;
|
|
682
692
|
};
|
|
693
|
+
command: {
|
|
694
|
+
type: "positional";
|
|
695
|
+
required: true;
|
|
696
|
+
};
|
|
683
697
|
}>;
|
|
684
698
|
//#endregion
|
|
685
699
|
//#region src/run.d.ts
|
|
@@ -690,4 +704,4 @@ declare function runCommand(name: string, argv?: string[], data?: {
|
|
|
690
704
|
result: unknown;
|
|
691
705
|
}>;
|
|
692
706
|
//#endregion
|
|
693
|
-
export { BuildArgs, DevArgs, VixtArgs, VixtCLIOptions, buildArgsDef, buildCommand, cleanupCommand, commands, devArgsDef, devCommand, main, parseVixtArgs, prepareCommand, previewCommand, runCommand, runMain, vixtArgsDef };
|
|
707
|
+
export { BuildArgs, DevArgs, VixtArgs, VixtCLIOptions, buildArgsDef, buildCommand, cleanupCommand, commands, devArgsDef, devCommand, main, mainArgsDef, parseVixtArgs, prepareCommand, previewCommand, runCommand, runMain, vixtArgsDef };
|
package/dist/index.mjs
CHANGED
|
@@ -172,9 +172,8 @@ const prepareCommand = defineCommand({
|
|
|
172
172
|
},
|
|
173
173
|
args: { ...sharedArgs },
|
|
174
174
|
async run(ctx) {
|
|
175
|
-
const {
|
|
176
|
-
await (
|
|
177
|
-
process.exit();
|
|
175
|
+
const { createBuilder } = await import("vite");
|
|
176
|
+
await createBuilder(resolveSharedConfig(ctx.args), null);
|
|
178
177
|
}
|
|
179
178
|
});
|
|
180
179
|
//#endregion
|
|
@@ -209,22 +208,24 @@ const commands = {
|
|
|
209
208
|
};
|
|
210
209
|
//#endregion
|
|
211
210
|
//#region src/main.ts
|
|
211
|
+
const mainArgsDef = { command: {
|
|
212
|
+
type: "positional",
|
|
213
|
+
required: true
|
|
214
|
+
} };
|
|
212
215
|
const main = defineCommand({
|
|
213
216
|
meta: {
|
|
214
217
|
name: "vixt",
|
|
215
218
|
description: "Vixt CLI"
|
|
216
219
|
},
|
|
217
|
-
args:
|
|
218
|
-
type: "positional",
|
|
219
|
-
required: true
|
|
220
|
-
} },
|
|
220
|
+
args: mainArgsDef,
|
|
221
221
|
subCommands: commands
|
|
222
222
|
});
|
|
223
223
|
const vixtArgsDef = {
|
|
224
|
+
...mainArgsDef,
|
|
224
225
|
...buildArgsDef,
|
|
225
226
|
...devArgsDef
|
|
226
227
|
};
|
|
227
|
-
function parseVixtArgs(args = process.argv.slice(
|
|
228
|
+
function parseVixtArgs(args = process.argv.slice(2)) {
|
|
228
229
|
return parseArgs(args, vixtArgsDef);
|
|
229
230
|
}
|
|
230
231
|
//#endregion
|
|
@@ -241,4 +242,4 @@ function runCommand(name, argv = process.argv.slice(2), data = {}) {
|
|
|
241
242
|
});
|
|
242
243
|
}
|
|
243
244
|
//#endregion
|
|
244
|
-
export { buildArgsDef, buildCommand, cleanupCommand, commands, devArgsDef, devCommand, main, parseVixtArgs, prepareCommand, previewCommand, runCommand, runMain, vixtArgsDef };
|
|
245
|
+
export { buildArgsDef, buildCommand, cleanupCommand, commands, devArgsDef, devCommand, main, mainArgsDef, parseVixtArgs, prepareCommand, previewCommand, runCommand, runMain, vixtArgsDef };
|