@itbox/cli 0.0.3 → 1.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 +9 -0
- package/bin/index.js +1 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -194,6 +194,15 @@ itbox config help
|
|
|
194
194
|
- 安装选择的包管理器:`npm install -g npm` 或 `npm install -g pnpm`
|
|
195
195
|
- 检查包管理器是否在系统PATH中
|
|
196
196
|
|
|
197
|
+
## 更新日志
|
|
198
|
+
|
|
199
|
+
### v0.0.1
|
|
200
|
+
- 初始版本发布
|
|
201
|
+
- 支持从Git仓库动态获取模板分支
|
|
202
|
+
- 支持npm/pnpm包管理器选择
|
|
203
|
+
- 实现配置管理功能
|
|
204
|
+
- 支持 `pnpm create itbox` 调用方式
|
|
205
|
+
|
|
197
206
|
## License
|
|
198
207
|
|
|
199
208
|
MIT
|
package/bin/index.js
CHANGED
|
@@ -6,11 +6,8 @@ import path from 'path';
|
|
|
6
6
|
import ora from 'ora';
|
|
7
7
|
import { execSync } from 'child_process';
|
|
8
8
|
import os from 'os';
|
|
9
|
-
import { fileURLToPath } from 'url';
|
|
10
9
|
|
|
11
10
|
const { prompt } = inquirer;
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
-
const __dirname = path.dirname(__filename);
|
|
14
11
|
|
|
15
12
|
// 配置文件相关
|
|
16
13
|
const CONFIG_DIR = path.join(os.homedir(), '.fe-cli');
|
|
@@ -120,7 +117,7 @@ function checkTemplateRepoConfig() {
|
|
|
120
117
|
}
|
|
121
118
|
|
|
122
119
|
// 从package.json获取项目信息
|
|
123
|
-
const packagePath = path.resolve(
|
|
120
|
+
const packagePath = path.resolve(path.dirname(new URL(import.meta.url).pathname), '../package.json');
|
|
124
121
|
const packageInfo = fs.readJSONSync(packagePath);
|
|
125
122
|
|
|
126
123
|
// 命令行配置
|