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 +35 -28
- package/lib/components/docs-data.json +1 -1
- package/package.json +1 -1
- package/presets/{grid.jux → default/layout.jux} +1 -1
- package/presets/index.jux +1 -1
- package/presets/styles/base.css +0 -1380
- package/presets/styles/notion.css +0 -127
- /package/presets/{styles → default}/layout.css +0 -0
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
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
if (fs.existsSync(
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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
|
-
|
|
255
|
-
|
|
267
|
+
fs.mkdirSync(presetsDest, { recursive: true });
|
|
268
|
+
copyRecursive(presetsSrc, presetsDest);
|
|
256
269
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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
|
package/package.json
CHANGED
package/presets/index.jux
CHANGED