@aibai/create-myvue 0.0.1 → 0.0.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # create-my-vue
1
+ # @aibai/create-myvue
2
2
 
3
3
  一个对 `pnpm create vue@latest` 命令的二次封装,支持通过配置文件自定义默认选项。
4
4
 
@@ -6,10 +6,10 @@
6
6
 
7
7
  ```bash
8
8
  # 全局安装
9
- npm install -g create-my-vue
9
+ npm install -g @aibai/create-myvue
10
10
 
11
11
  # 或者使用 npx
12
- npx create-my-vue
12
+ npx @aibai/create-myvue
13
13
  ```
14
14
 
15
15
  ## 使用方法
@@ -18,19 +18,19 @@ npx create-my-vue
18
18
 
19
19
  ```bash
20
20
  # 使用默认配置创建项目
21
- create-my-vue
21
+ npx @aibai/create-myvue
22
22
 
23
23
  # 指定项目名称
24
- create-my-vue my-vue-project
24
+ npx @aibai/create-myvue my-vue-project
25
25
 
26
26
  # 使用默认选项
27
- create-my-vue --default
27
+ npx @aibai/create-myvue --default
28
28
  ```
29
29
 
30
30
  ### 命令行选项
31
31
 
32
32
  ```
33
- Usage: create-my-vue [options] [projectName]
33
+ Usage: npx @aibai/create-myvue [options] [projectName]
34
34
 
35
35
  A wrapper around pnpm create vue@latest with custom defaults
36
36
 
@@ -92,7 +92,7 @@ module.exports = {
92
92
 
93
93
  ```bash
94
94
  # 即使配置文件中 typescript 为 false,这里也会创建 TypeScript 项目
95
- create-my-vue --typescript
95
+ npx @aibai/create-myvue --typescript
96
96
  ```
97
97
 
98
98
  ## 示例
@@ -112,19 +112,19 @@ create-my-vue --typescript
112
112
 
113
113
  2. 运行命令:
114
114
  ```bash
115
- create-my-vue my-vue-app
115
+ npx @aibai/create-myvue my-vue-app
116
116
  ```
117
117
 
118
118
  ### 2. 直接使用命令行选项
119
119
 
120
120
  ```bash
121
- create-my-vue my-vue-app --typescript --router --pinia --eslint --prettier
121
+ npx @aibai/create-myvue my-vue-app --typescript --router --pinia --eslint --prettier
122
122
  ```
123
123
 
124
124
  ### 3. 使用默认选项
125
125
 
126
126
  ```bash
127
- create-my-vue my-vue-app --default
127
+ npx @aibai/create-myvue my-vue-app --default
128
128
  ```
129
129
 
130
130
  ## 许可证
package/bin/cli.js CHANGED
@@ -939,13 +939,13 @@ function updateProjectConfig(projectPath, selectedPlugins) {
939
939
  content = content.replace(/plugins:\s*\[([\s\S]*?)\]/g, (match, existingPlugins) => {
940
940
  if (existingPlugins.trim()) {
941
941
  return `plugins: [
942
- ${existingPlugins.trim()},
943
- ${pluginStatements}
944
- ]`;
942
+ ${existingPlugins.trim()},
943
+ ${pluginStatements}
944
+ ]`;
945
945
  } else {
946
946
  return `plugins: [
947
- ${pluginStatements}
948
- ]`;
947
+ ${pluginStatements}
948
+ ]`;
949
949
  }
950
950
  });
951
951
  }
@@ -1085,9 +1085,9 @@ async function main(projectName, options) {
1085
1085
  }
1086
1086
 
1087
1087
  program
1088
- .name('create-my-vue')
1088
+ .name('create-myvue')
1089
1089
  .description('pnpm create vue@latest 的二次封装,支持自定义默认选项')
1090
- .version('1.0.0')
1090
+ .version('0.0.1')
1091
1091
  .argument('[project-name]', '要创建的项目名称')
1092
1092
  .option('-d, --default', '使用默认选项')
1093
1093
  .option('--dry-run', '显示将要执行的命令,但不实际运行')
@@ -13,7 +13,7 @@ module.exports = {
13
13
  jsx: true, // 添加 JSX 支持
14
14
  router: true, // 添加 Vue Router
15
15
  pinia: true, // 添加 Pinia
16
- vitest: true, // 添加 Vitest 用于单元测试
16
+ vitest: false, // 添加 Vitest 用于单元测试
17
17
  cypress: false, // 不添加 Cypress 用于端到端测试
18
18
  eslint: true, // 添加 ESLint 用于代码质量
19
19
  prettier: true // 添加 Prettier 用于代码格式化
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibai/create-myvue",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "pnpm create vue@latest 的二次封装,支持自定义默认选项",
5
5
  "main": "index.js",
6
6
  "bin": {