juxscript 1.1.134 → 1.1.135
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/dom-structure-map.json +1 -1
- package/machinery/compiler3.js +8 -0
- package/package.json +1 -1
package/dom-structure-map.json
CHANGED
package/machinery/compiler3.js
CHANGED
|
@@ -58,6 +58,7 @@ export class JuxCompiler {
|
|
|
58
58
|
*/
|
|
59
59
|
scanFiles() {
|
|
60
60
|
const views = [], dataModules = [], sharedModules = [];
|
|
61
|
+
const processedNames = new Set(); // Track processed file base names to avoid duplicates
|
|
61
62
|
|
|
62
63
|
/**
|
|
63
64
|
* Recursive directory scanner
|
|
@@ -80,6 +81,13 @@ export class JuxCompiler {
|
|
|
80
81
|
const relativePath = path.relative(this.srcDir, fullPath);
|
|
81
82
|
const name = relativePath.replace(/\.[^/.]+$/, ''); // Remove extension
|
|
82
83
|
|
|
84
|
+
// ✅ Skip if we've already processed this base name (avoid .jux + .js duplicates)
|
|
85
|
+
if (processedNames.has(name)) {
|
|
86
|
+
console.warn(`⚠️ Skipping duplicate: ${relativePath} (already processed ${name})`);
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
processedNames.add(name);
|
|
90
|
+
|
|
83
91
|
if (file.includes('data')) {
|
|
84
92
|
dataModules.push({ name, file: relativePath, content });
|
|
85
93
|
} else if (/export\s+(function|const|let|var|class)\s+/.test(content)) {
|