@aibai/create-myvue 0.0.5 → 0.0.8

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/cli.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  const { program } = require('commander');
2
3
  const { spawn } = require('child_process');
3
4
  const fs = require('fs');
@@ -292,6 +293,10 @@ async function main(projectName, options) {
292
293
  await executeCommand('pnpm', args);
293
294
 
294
295
  // 问询用户是否添加额外插件
296
+ if (!finalConfig.projectName) {
297
+ console.log('未指定项目名称,跳过插件配置...');
298
+ return;
299
+ }
295
300
  const projectPath = path.join(process.cwd(), finalConfig.projectName);
296
301
 
297
302
  if (fs.existsSync(projectPath)) {
package/index.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+
3
+ // 指向 bin/cli.js 文件
4
+ require('./bin/cli.js');
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@aibai/create-myvue",
3
- "version": "0.0.5",
3
+ "version": "0.0.8",
4
4
  "description": "pnpm create vue@latest 的二次封装,支持自定义默认选项",
5
- "main": "index.js",
5
+ "main": "./bin/cli.js",
6
6
  "bin": {
7
7
  "create-myvue": "./bin/cli.js"
8
8
  },