@zh-moody/safe-env 0.3.2 → 0.3.3
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 +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,6 +21,29 @@
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
+
### 📦 安装 (Installation)
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install @zh-moody/safe-env
|
|
28
|
+
# 或者
|
|
29
|
+
pnpm add @zh-moody/safe-env
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### 🛠️ 准备工作 (Prerequisites)
|
|
35
|
+
|
|
36
|
+
在项目根目录下创建一个 `.env` 文件(这是本库解析数据的来源):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# .env 示例
|
|
40
|
+
VITE_API_URL=https://api.com
|
|
41
|
+
VITE_PORT=3000
|
|
42
|
+
VITE_FEATURES=auth,storage
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
24
47
|
### 🚀 快速上手
|
|
25
48
|
|
|
26
49
|
#### 🔹 [Vite / React / Vue] 使用
|