juxscript 1.1.96 → 1.1.97
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 +14 -6
- package/package.json +1 -1
package/dom-structure-map.json
CHANGED
package/machinery/compiler3.js
CHANGED
|
@@ -501,13 +501,13 @@ navigate(location.pathname);
|
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
// Copy all .jux and .js files from source to dist
|
|
504
|
-
this._copySourceFilesRecursive(this.srcDir,
|
|
504
|
+
this._copySourceFilesRecursive(this.srcDir, this.srcDir, distJuxDir);
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
/**
|
|
508
508
|
* Recursively copy .jux and .js files preserving folder structure
|
|
509
509
|
*/
|
|
510
|
-
_copySourceFilesRecursive(src,
|
|
510
|
+
_copySourceFilesRecursive(src, baseDir, distBase) {
|
|
511
511
|
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
512
512
|
|
|
513
513
|
entries.forEach(entry => {
|
|
@@ -515,18 +515,25 @@ navigate(location.pathname);
|
|
|
515
515
|
|
|
516
516
|
const srcPath = path.join(src, entry.name);
|
|
517
517
|
const relativePath = path.relative(baseDir, srcPath);
|
|
518
|
-
const destPath = path.join(
|
|
518
|
+
const destPath = path.join(distBase, relativePath);
|
|
519
519
|
|
|
520
520
|
if (entry.isDirectory()) {
|
|
521
|
-
// Create directory
|
|
521
|
+
// Create directory if it doesn't exist
|
|
522
522
|
if (!fs.existsSync(destPath)) {
|
|
523
523
|
fs.mkdirSync(destPath, { recursive: true });
|
|
524
524
|
}
|
|
525
|
-
|
|
525
|
+
// Recurse into subdirectory
|
|
526
|
+
this._copySourceFilesRecursive(srcPath, baseDir, distBase);
|
|
526
527
|
} else if (entry.name.endsWith('.jux') || entry.name.endsWith('.js')) {
|
|
527
|
-
// Copy .jux and .js files
|
|
528
|
+
// Copy .jux and .js files (skip assets)
|
|
528
529
|
if (!this.isAssetFile(entry.name)) {
|
|
530
|
+
// Ensure parent directory exists
|
|
531
|
+
const destDir = path.dirname(destPath);
|
|
532
|
+
if (!fs.existsSync(destDir)) {
|
|
533
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
534
|
+
}
|
|
529
535
|
fs.copyFileSync(srcPath, destPath);
|
|
536
|
+
console.log(` 📋 Copied: ${relativePath}`);
|
|
530
537
|
}
|
|
531
538
|
}
|
|
532
539
|
});
|
|
@@ -557,6 +564,7 @@ navigate(location.pathname);
|
|
|
557
564
|
// ✅ Copy source files to dist/jux BEFORE generating entry point
|
|
558
565
|
console.log('📋 Copying source files to dist...');
|
|
559
566
|
this._copySourceToDist();
|
|
567
|
+
console.log('✅ Source files copied\n');
|
|
560
568
|
|
|
561
569
|
// Generate entry point
|
|
562
570
|
const entryCode = this.generateEntryPoint(views, dataModules, sharedModules);
|