@aibai/create-myvue 0.0.3 → 0.0.5
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-
|
|
64
|
+
你可以在当前目录下创建 `create-myvue.config.js` 文件来自定义默认选项。
|
|
65
65
|
|
|
66
66
|
### 配置示例
|
|
67
67
|
|
|
68
68
|
```javascript
|
|
69
|
-
// create-
|
|
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-
|
|
102
|
+
1. 创建 `create-myvue.config.js` 文件:
|
|
103
103
|
```javascript
|
|
104
104
|
module.exports = {
|
|
105
105
|
typescript: true,
|
package/bin/cli.js
CHANGED
|
@@ -120,7 +120,7 @@ const plugins = [
|
|
|
120
120
|
|
|
121
121
|
// 读取配置文件
|
|
122
122
|
function getConfig() {
|
|
123
|
-
const configPath = path.join(process.cwd(), 'create-
|
|
123
|
+
const configPath = path.join(process.cwd(), 'create-myvue.config.js');
|
|
124
124
|
if (fs.existsSync(configPath)) {
|
|
125
125
|
return require(configPath);
|
|
126
126
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aibai/create-myvue",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "pnpm create vue@latest 的二次封装,支持自定义默认选项",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"create-
|
|
7
|
+
"create-myvue": "./bin/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|