drgame-cc 1.0.9 → 1.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drgame-cc",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Cocos Creator 资源导出工具包 - 支持预制体、图片、音乐等资源导出",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,27 +12,7 @@ const projectRoot = path.resolve(__dirname, '..', '..');
12
12
  // ============================================================
13
13
  // 2. 加载宿主项目根目录下的 .env
14
14
  // ============================================================
15
- function loadEnvFile() {
16
- const envPath = path.join(projectRoot, '.env');
17
- if (fs.existsSync(envPath)) {
18
- const envContent = fs.readFileSync(envPath, 'utf-8');
19
- envContent.split('\n').forEach(line => {
20
- const trimmedLine = line.trim();
21
- if (trimmedLine && !trimmedLine.startsWith('#')) {
22
- const [key, ...valueParts] = trimmedLine.split('=');
23
- if (key && valueParts.length > 0) {
24
- const value = valueParts.join('=').trim();
25
- if (!process.env[key]) {
26
- process.env[key] = value.replace(/^["']|["']$/g, '');
27
- }
28
- }
29
- }
30
- });
31
- console.log('✅ 已加载 .env');
32
- }
33
- }
34
-
35
- loadEnvFile();
15
+ console.log('✅ 开始拷贝资源');
36
16
 
37
17
  // ============================================================
38
18
  // 3. 确定目标目录