@aibai/create-myvue 0.0.3 → 0.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/README.md CHANGED
@@ -61,12 +61,12 @@ Options:
61
61
 
62
62
  ## 配置文件
63
63
 
64
- 你可以在当前目录下创建 `create-my-vue.config.js` 文件来自定义默认选项。
64
+ 你可以在当前目录下创建 `create-myvue.config.js` 文件来自定义默认选项。
65
65
 
66
66
  ### 配置示例
67
67
 
68
68
  ```javascript
69
- // create-my-vue.config.js
69
+ // create-myvue.config.js
70
70
  module.exports = {
71
71
  // 项目名称(可选,也可以通过命令行参数指定)
72
72
  // projectName: 'my-vue-project',
@@ -99,7 +99,7 @@ npx @aibai/create-myvue --typescript
99
99
 
100
100
  ### 1. 使用配置文件创建项目
101
101
 
102
- 1. 创建 `create-my-vue.config.js` 文件:
102
+ 1. 创建 `create-myvue.config.js` 文件:
103
103
  ```javascript
104
104
  module.exports = {
105
105
  typescript: true,
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');
@@ -120,7 +121,7 @@ const plugins = [
120
121
 
121
122
  // 读取配置文件
122
123
  function getConfig() {
123
- const configPath = path.join(process.cwd(), 'create-my-vue.config.js');
124
+ const configPath = path.join(process.cwd(), 'create-myvue.config.js');
124
125
  if (fs.existsSync(configPath)) {
125
126
  return require(configPath);
126
127
  }
@@ -1,5 +1,5 @@
1
- // create-my-vue.config.js 示例配置文件
2
- // 复制此文件并重命名为 create-my-vue.config.js 以使用自定义配置
1
+ // create-myvue.config.js 示例配置文件
2
+ // 复制此文件并重命名为 create-myvue.config.js 以使用自定义配置
3
3
 
4
4
  module.exports = {
5
5
  // 项目名称
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,10 +1,10 @@
1
1
  {
2
2
  "name": "@aibai/create-myvue",
3
- "version": "0.0.3",
3
+ "version": "0.0.6",
4
4
  "description": "pnpm create vue@latest 的二次封装,支持自定义默认选项",
5
- "main": "index.js",
5
+ "main": "./bin/cli.js",
6
6
  "bin": {
7
- "create-my-vue": "./bin/cli.js"
7
+ "create-myvue": "./bin/cli.js"
8
8
  },
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1"