gridsum-vue3-pc 1.0.4 → 1.0.6
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/bin/create-vue3-pc.mjs +0 -35
- package/package.json +1 -1
package/bin/create-vue3-pc.mjs
CHANGED
|
@@ -134,17 +134,6 @@ function getInstallCommand(pkgManager) {
|
|
|
134
134
|
return args;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
function getRunCommand(pkgManager, script) {
|
|
138
|
-
switch (pkgManager) {
|
|
139
|
-
case 'yarn':
|
|
140
|
-
case 'pnpm':
|
|
141
|
-
case 'bun':
|
|
142
|
-
return [pkgManager, script];
|
|
143
|
-
default:
|
|
144
|
-
return [pkgManager, 'run', script];
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
137
|
function runCommand(command, options = {}) {
|
|
149
138
|
const [cmd, ...args] = command;
|
|
150
139
|
const result = spawn.sync(cmd, args, {
|
|
@@ -483,16 +472,6 @@ async function main() {
|
|
|
483
472
|
autoInstall = result;
|
|
484
473
|
}
|
|
485
474
|
|
|
486
|
-
let autoStart = argv['auto-start'];
|
|
487
|
-
if (autoStart === undefined && isInteractive && autoInstall) {
|
|
488
|
-
const result = await prompts.confirm({
|
|
489
|
-
message: 'Start dev server now?',
|
|
490
|
-
initialValue: false,
|
|
491
|
-
});
|
|
492
|
-
if (prompts.isCancel(result)) return cancel();
|
|
493
|
-
autoStart = result;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
475
|
if (autoInstall && !process.env._CREATE_VUE3_PC_TEST) {
|
|
497
476
|
process.stdout.write(`\r\x1b[K${pc.dim('Installing dependencies...')}\n`);
|
|
498
477
|
runCommand(getInstallCommand(pkgManager), { cwd: root });
|
|
@@ -503,12 +482,6 @@ async function main() {
|
|
|
503
482
|
tryGitInit(root);
|
|
504
483
|
}
|
|
505
484
|
|
|
506
|
-
if (autoStart) {
|
|
507
|
-
prompts.log.step(`Starting dev server... (press ${pc.bold('Ctrl+C')} to stop)`);
|
|
508
|
-
runCommand(getRunCommand(pkgManager, 'dev'), { cwd: root });
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
485
|
const cdProjectName = path.relative(process.cwd(), root);
|
|
513
486
|
let doneMessage = '';
|
|
514
487
|
|
|
@@ -523,14 +496,6 @@ async function main() {
|
|
|
523
496
|
doneMessage += `\n ${pc.bold(pc.cyan(pkgManager))} ${pkgManager === 'yarn' ? 'dev' : 'run dev'}`;
|
|
524
497
|
|
|
525
498
|
prompts.outro(`${pc.green('Done!')} Now run:${doneMessage}`);
|
|
526
|
-
|
|
527
|
-
console.log(`
|
|
528
|
-
${pc.dim('Available commands:')}
|
|
529
|
-
${pkgManager} ${pkgManager === 'yarn' ? 'dev' : 'run dev'} ${pc.dim('- Start dev server')}
|
|
530
|
-
${pkgManager} ${pkgManager === 'yarn' ? 'build' : 'run build'} ${pc.dim('- Build for production')}
|
|
531
|
-
${pkgManager} ${pkgManager === 'yarn' ? 'lint' : 'run lint'} ${pc.dim('- Lint code')}
|
|
532
|
-
${pkgManager} ${pkgManager === 'yarn' ? 'test' : 'run test'} ${pc.dim('- Run tests')}
|
|
533
|
-
`);
|
|
534
499
|
}
|
|
535
500
|
|
|
536
501
|
main().catch((e) => {
|