@hile/cli 1.0.10 → 1.0.11

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.
Files changed (2) hide show
  1. package/README.md +3 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -33,9 +33,12 @@ hile start --dev # 开发模式:NODE_ENV=development,扫描 src/ 目录
33
33
  | 选项 | 说明 | 默认值 |
34
34
  |------|------|--------|
35
35
  | `-d, --dev` | 开发模式:设置 `NODE_ENV=development`,使用 tsx 运行 TypeScript,扫描 `src/` | `false` |
36
+ | `-e, --env-file <path>` | 加载指定 env 文件到 `process.env`(与 Node 原生 `--env-file` 语义一致:先加载的优先,已存在的 key 不覆盖)。可多次指定 | — |
36
37
 
37
38
  未使用 `--dev` 时,CLI 会将 `process.env.NODE_ENV` 设为 `production`;使用 `--dev` 时设为 `development`,便于业务代码区分环境。
38
39
 
40
+ **示例:** `hile start --env-file .env --env-file .env.local` 会先加载 `.env`,再加载 `.env.local`(后者不会覆盖前者已设置的变量)。依赖 Node 20.12+ 原生 `process.loadEnvFile()`。
41
+
39
42
  ### 其他
40
43
 
41
44
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hile/cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -29,5 +29,5 @@
29
29
  "glob": "^13.0.6",
30
30
  "tsx": "^4.21.0"
31
31
  },
32
- "gitHead": "a6eab4e7803f0df7d4bca9a0bdeca76692dbc883"
32
+ "gitHead": "5708e7878ab54a917c32d4fdbbd66c07d9d8f04d"
33
33
  }