juxscript 1.1.8 → 1.1.9
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/machinery/build3.js +8 -7
- package/package.json +1 -1
package/machinery/build3.js
CHANGED
|
@@ -11,24 +11,25 @@ const JUX_CONFIG_PATH = path.resolve(PROJECT_ROOT, 'juxconfig.js');
|
|
|
11
11
|
let rawConfig = {};
|
|
12
12
|
|
|
13
13
|
try {
|
|
14
|
-
|
|
14
|
+
const imported = await import(JUX_CONFIG_PATH);
|
|
15
|
+
rawConfig = imported.config || imported.default || {};
|
|
15
16
|
console.log(`⚙️ Loaded config: ${JUX_CONFIG_PATH}`);
|
|
16
17
|
} catch (err) {
|
|
17
18
|
console.warn(`⚠️ No juxconfig.js found, using defaults`);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
// ═══════════════════════════════════════════════════════════════
|
|
21
|
-
// EXPLODE CONFIG
|
|
22
|
+
// EXPLODE CONFIG - Handle both old and new structure
|
|
22
23
|
// ═══════════════════════════════════════════════════════════════
|
|
23
24
|
const directories = {
|
|
24
|
-
source: rawConfig.directories?.source || './jux',
|
|
25
|
-
distribution: rawConfig.directories?.distribution || './.jux-dist'
|
|
25
|
+
source: rawConfig.directories?.source || rawConfig.sourceDir || './jux',
|
|
26
|
+
distribution: rawConfig.directories?.distribution || rawConfig.distDir || './.jux-dist'
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
const defaults = {
|
|
29
|
-
httpPort: rawConfig.defaults?.httpPort || 3000,
|
|
30
|
-
wsPort: rawConfig.defaults?.wsPort || 3001,
|
|
31
|
-
autoRoute: rawConfig.defaults?.autoRoute ?? true
|
|
30
|
+
httpPort: rawConfig.defaults?.httpPort || rawConfig.ports?.http || 3000,
|
|
31
|
+
wsPort: rawConfig.defaults?.wsPort || rawConfig.ports?.ws || 3001,
|
|
32
|
+
autoRoute: rawConfig.defaults?.autoRoute ?? rawConfig.autoRoutes ?? true
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
// Resolve absolute paths
|