juxscript 1.0.27 → 1.0.29

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
@@ -233,36 +233,43 @@ async function buildProject(isServe = false) {
233
233
  // Create structure
234
234
  fs.mkdirSync(juxDir, { recursive: true });
235
235
 
236
- // Copy hey.jux as the starter template
237
- const heyJuxSrc = path.join(PATHS.packageRoot, 'presets', 'hey.jux');
238
- const heyJuxDest = path.join(juxDir, 'index.jux');
239
-
240
- if (fs.existsSync(heyJuxSrc)) {
241
- fs.copyFileSync(heyJuxSrc, heyJuxDest);
242
- console.log('+ Created jux/index.jux from hey.jux template');
243
- } else {
244
- console.warn('⚠️ hey.jux template not found, creating basic file');
245
- const basicContent = `import { jux } from 'juxscript';\n\njux.heading('welcome').text('Welcome to JUX').render('#app');`;
246
- fs.writeFileSync(heyJuxDest, basicContent);
247
- console.log('+ Created jux/index.jux');
248
- }
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');
236
+ // Copy entire presets folder to jux/presets/
237
+ const presetsSrc = path.join(PATHS.packageRoot, 'presets');
238
+ const presetsDest = path.join(juxDir, 'presets');
239
+
240
+ if (fs.existsSync(presetsSrc)) {
241
+ let copiedCount = 0;
242
+
243
+ function copyRecursive(src, dest) {
244
+ const entries = fs.readdirSync(src, { withFileTypes: true });
245
+
246
+ for (const entry of entries) {
247
+ const srcPath = path.join(src, entry.name);
248
+ const destPath = path.join(dest, entry.name);
249
+
250
+ // Skip hey.jux since we already copied it to index.jux
251
+ if (entry.isFile() && entry.name === 'hey.jux') {
252
+ continue;
253
+ }
254
+
255
+ if (entry.isDirectory()) {
256
+ fs.mkdirSync(destPath, { recursive: true });
257
+ copyRecursive(srcPath, destPath);
258
+ } else if (entry.isFile()) {
259
+ fs.copyFileSync(srcPath, destPath);
260
+ const relativePath = path.relative(presetsSrc, srcPath);
261
+ console.log(`+ Copied preset: presets/${relativePath}`);
262
+ copiedCount++;
263
+ }
264
+ }
265
+ }
253
266
 
254
- if (fs.existsSync(presetsStylesSrc)) {
255
- fs.mkdirSync(stylesDest, { recursive: true });
267
+ fs.mkdirSync(presetsDest, { recursive: true });
268
+ copyRecursive(presetsSrc, presetsDest);
256
269
 
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}`);
264
- }
265
- });
270
+ if (copiedCount > 0) {
271
+ console.log(`+ Copied ${copiedCount} preset file(s) to jux/presets/`);
272
+ }
266
273
  }
267
274
 
268
275
  // 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "type": "module",
5
5
  "description": "A JavaScript UX authorship platform",
6
6
  "main": "lib/jux.js",
@@ -1,7 +1,7 @@
1
1
  import { jux } from 'juxscript';
2
2
 
3
3
  // Import the layout styles
4
- jux.include('styles/layout.css');
4
+ jux.include('layout.css');
5
5
 
6
6
  // ═══════════════════════════════════════════════════════════════════
7
7
  // GRID LAYOUT - INITIALIZATION FUNCTION
package/presets/index.jux CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jux, state } from 'juxscript';
2
- import { initializeGrid } from './grid.jux';
2
+ import { initializeGrid } from '../presets/default/layout.jux';
3
3
 
4
4
  // Initialize the grid layout - this executes the rendering
5
5
  const grid = initializeGrid();