juxscript 1.0.13 → 1.0.15
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/bin/cli.js +1 -1
- package/lib/components/write.ts +9 -2
- package/machinery/compiler.js +3 -3
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -106,7 +106,7 @@ async function buildProject(isServe = false) {
|
|
|
106
106
|
await copyLibToOutput(PATHS.juxLib, PATHS.frontendDist);
|
|
107
107
|
|
|
108
108
|
// Step 2.5: Copy presets folder
|
|
109
|
-
await copyPresetsToOutput(PATHS.
|
|
109
|
+
await copyPresetsToOutput(PATHS.packageRoot, PATHS.frontendDist);
|
|
110
110
|
|
|
111
111
|
// Step 3: Copy project assets from jux/ (CSS, JS, images)
|
|
112
112
|
await copyProjectAssets(PATHS.juxSource, PATHS.frontendDist);
|
package/lib/components/write.ts
CHANGED
|
@@ -50,7 +50,13 @@ export class Write {
|
|
|
50
50
|
...options
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Set HTML mode (chainable setter)
|
|
55
|
+
*/
|
|
56
|
+
html(enabled: boolean = true): this {
|
|
57
|
+
this.options.html = enabled;
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
54
60
|
/**
|
|
55
61
|
* Render content to target element
|
|
56
62
|
* Falls back to body if no target specified
|
|
@@ -281,4 +287,5 @@ export function writeSpan(content: string, options: Omit<WriteOptions, 'tagType'
|
|
|
281
287
|
// Write div (explicit)
|
|
282
288
|
export function writeDiv(content: string, options: Omit<WriteOptions, 'tagType'> = {}): Write {
|
|
283
289
|
return new Write(content, { ...options, tagType: 'div' });
|
|
284
|
-
}
|
|
290
|
+
}
|
|
291
|
+
|
package/machinery/compiler.js
CHANGED
|
@@ -280,13 +280,13 @@ export async function transpileProjectTypeScript(srcDir, destDir) {
|
|
|
280
280
|
/**
|
|
281
281
|
* Copy presets folder from lib to dist
|
|
282
282
|
*
|
|
283
|
-
* @param {string}
|
|
283
|
+
* @param {string} packageRoot - Source package root directory
|
|
284
284
|
* @param {string} distDir - Destination directory
|
|
285
285
|
*/
|
|
286
|
-
export async function copyPresetsToOutput(
|
|
286
|
+
export async function copyPresetsToOutput(packageRoot, distDir) {
|
|
287
287
|
console.log('📦 Copying presets...');
|
|
288
288
|
|
|
289
|
-
const presetsSrc = path.join(
|
|
289
|
+
const presetsSrc = path.join(packageRoot, 'presets');
|
|
290
290
|
const presetsDest = path.join(distDir, 'presets');
|
|
291
291
|
|
|
292
292
|
if (!fs.existsSync(presetsSrc)) {
|