juxscript 1.0.26 → 1.0.28

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 CHANGED
@@ -247,22 +247,43 @@ async function buildProject(isServe = false) {
247
247
  console.log('+ Created jux/index.jux');
248
248
  }
249
249
 
250
- // Copy preset styles from presets/styles/ to jux/styles/
251
- const presetsStylesSrc = path.join(PATHS.packageRoot, 'presets', 'styles');
252
- const stylesDest = path.join(juxDir, 'styles');
253
-
254
- if (fs.existsSync(presetsStylesSrc)) {
255
- fs.mkdirSync(stylesDest, { recursive: true });
256
-
257
- const styleFiles = fs.readdirSync(presetsStylesSrc);
258
- styleFiles.forEach(file => {
259
- if (file.endsWith('.css')) {
260
- const srcFile = path.join(presetsStylesSrc, file);
261
- const destFile = path.join(stylesDest, file);
262
- fs.copyFileSync(srcFile, destFile);
263
- console.log(`+ Copied preset style: styles/${file}`);
250
+ // Copy entire presets folder to jux/presets/
251
+ const presetsSrc = path.join(PATHS.packageRoot, 'presets');
252
+ const presetsDest = path.join(juxDir, 'presets');
253
+
254
+ if (fs.existsSync(presetsSrc)) {
255
+ let copiedCount = 0;
256
+
257
+ function copyRecursive(src, dest) {
258
+ const entries = fs.readdirSync(src, { withFileTypes: true });
259
+
260
+ for (const entry of entries) {
261
+ const srcPath = path.join(src, entry.name);
262
+ const destPath = path.join(dest, entry.name);
263
+
264
+ // Skip hey.jux since we already copied it to index.jux
265
+ if (entry.isFile() && entry.name === 'hey.jux') {
266
+ continue;
267
+ }
268
+
269
+ if (entry.isDirectory()) {
270
+ fs.mkdirSync(destPath, { recursive: true });
271
+ copyRecursive(srcPath, destPath);
272
+ } else if (entry.isFile()) {
273
+ fs.copyFileSync(srcPath, destPath);
274
+ const relativePath = path.relative(presetsSrc, srcPath);
275
+ console.log(`+ Copied preset: presets/${relativePath}`);
276
+ copiedCount++;
277
+ }
264
278
  }
265
- });
279
+ }
280
+
281
+ fs.mkdirSync(presetsDest, { recursive: true });
282
+ copyRecursive(presetsSrc, presetsDest);
283
+
284
+ if (copiedCount > 0) {
285
+ console.log(`+ Copied ${copiedCount} preset file(s) to jux/presets/`);
286
+ }
266
287
  }
267
288
 
268
289
  // Create package.json if it doesn't exist
@@ -2059,5 +2059,5 @@
2059
2059
  }
2060
2060
  ],
2061
2061
  "version": "1.0.0",
2062
- "lastUpdated": "2026-01-28T14:47:56.941Z"
2062
+ "lastUpdated": "2026-01-28T15:24:08.460Z"
2063
2063
  }
@@ -173,7 +173,7 @@ export async function transpileProjectTypeScript(srcDir, destDir) {
173
173
  }
174
174
 
175
175
  /**
176
- * Copy presets folder from lib to dist
176
+ * Copy presets folder from lib to dist (maintaining directory structure)
177
177
  *
178
178
  * @param {string} packageRoot - Source package root directory
179
179
  * @param {string} distDir - Destination directory
@@ -195,21 +195,30 @@ export async function copyPresetsToOutput(packageRoot, distDir) {
195
195
 
196
196
  fs.mkdirSync(presetsDest, { recursive: true });
197
197
 
198
- // Copy all files in presets directory
199
- const files = fs.readdirSync(presetsSrc);
198
+ // Recursively copy entire presets directory structure
200
199
  let copiedCount = 0;
201
200
 
202
- for (const file of files) {
203
- const srcPath = path.join(presetsSrc, file);
204
- const destPath = path.join(presetsDest, file);
201
+ function copyRecursive(src, dest) {
202
+ const entries = fs.readdirSync(src, { withFileTypes: true });
205
203
 
206
- if (fs.statSync(srcPath).isFile()) {
207
- fs.copyFileSync(srcPath, destPath);
208
- console.log(` ✓ ${file}`);
209
- copiedCount++;
204
+ for (const entry of entries) {
205
+ const srcPath = path.join(src, entry.name);
206
+ const destPath = path.join(dest, entry.name);
207
+
208
+ if (entry.isDirectory()) {
209
+ fs.mkdirSync(destPath, { recursive: true });
210
+ copyRecursive(srcPath, destPath);
211
+ } else if (entry.isFile()) {
212
+ fs.copyFileSync(srcPath, destPath);
213
+ const relativePath = path.relative(presetsSrc, srcPath);
214
+ console.log(` ✓ ${relativePath}`);
215
+ copiedCount++;
216
+ }
210
217
  }
211
218
  }
212
219
 
220
+ copyRecursive(presetsSrc, presetsDest);
221
+
213
222
  console.log(`✅ Copied ${copiedCount} preset file(s)\n`);
214
223
  }
215
224
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "type": "module",
5
5
  "description": "A JavaScript UX authorship platform",
6
6
  "main": "lib/jux.js",