juxscript 1.0.47 → 1.0.48
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 +16 -0
- package/juxconfig.example.js +69 -0
- package/package.json +2 -1
package/bin/cli.js
CHANGED
|
@@ -71,6 +71,22 @@ if (command === 'create') {
|
|
|
71
71
|
fs.writeFileSync('.gitignore', `jux-dist/\nnode_modules/\n.DS_Store\n.env\n*.log\n`);
|
|
72
72
|
console.log(` ✓ .gitignore created`);
|
|
73
73
|
|
|
74
|
+
// ✅ Copy juxconfig.example.js from the package
|
|
75
|
+
const packageRoot = path.resolve(__dirname, '..');
|
|
76
|
+
const configExampleSrc = path.join(packageRoot, 'juxconfig.example.js');
|
|
77
|
+
|
|
78
|
+
if (fs.existsSync(configExampleSrc)) {
|
|
79
|
+
// Copy as juxconfig.js (working config)
|
|
80
|
+
const configDest = path.join(process.cwd(), 'juxconfig.js');
|
|
81
|
+
fs.copyFileSync(configExampleSrc, configDest);
|
|
82
|
+
console.log(` ✓ juxconfig.js created`);
|
|
83
|
+
|
|
84
|
+
// Also copy as .example (reference)
|
|
85
|
+
const configExampleDest = path.join(process.cwd(), 'juxconfig.example.js');
|
|
86
|
+
fs.copyFileSync(configExampleSrc, configExampleDest);
|
|
87
|
+
console.log(` ✓ juxconfig.example.js created`);
|
|
88
|
+
}
|
|
89
|
+
|
|
74
90
|
console.log(`
|
|
75
91
|
╔═══════════════════════════════════════════════════════╗
|
|
76
92
|
║ ║
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JUX Configuration File
|
|
3
|
+
*
|
|
4
|
+
* This file is optional. JUX works out-of-the-box with sensible defaults.
|
|
5
|
+
* Customize only if you need to change default behavior.
|
|
6
|
+
*
|
|
7
|
+
* Copy this file to your project root as 'juxconfig.js' to customize.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const routeOverrides = {
|
|
11
|
+
|
|
12
|
+
// Example: Override the route for 'about' page
|
|
13
|
+
// 'about': '/about-us',
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
export default {
|
|
17
|
+
|
|
18
|
+
// Application name
|
|
19
|
+
appName: 'My JUX App',
|
|
20
|
+
autoRoutes: true, // Enable automatic route generation
|
|
21
|
+
// Source directory for .jux files (default: 'jux')
|
|
22
|
+
sourceDir: 'jux',
|
|
23
|
+
|
|
24
|
+
// Output directory for built files (default: 'jux-dist')
|
|
25
|
+
distDir: 'jux-dist',
|
|
26
|
+
|
|
27
|
+
services: {
|
|
28
|
+
database: 'http://localhost:4000/api/db',
|
|
29
|
+
auth: 'http://localhost:4000/api/auth',
|
|
30
|
+
monday: 'http://api.rxtrail.monday.com/api/'
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
// Jux Dev server ports
|
|
34
|
+
ports: {
|
|
35
|
+
http: 3000, // Main HTTP server
|
|
36
|
+
ws: 3001 // WebSocket for hot reload
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
// Build options (future features)
|
|
40
|
+
build: {
|
|
41
|
+
minify: false, // Minify output
|
|
42
|
+
sourcemap: true // Generate sourcemaps
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
// Bootstrap functions (run before app starts)
|
|
46
|
+
// Useful for: auth setup, environment loading, feature flags, etc.
|
|
47
|
+
// Similar to Laravel service providers
|
|
48
|
+
bootstrap: [
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
// Example 1: Initialize authentication
|
|
52
|
+
// async function initAuth() {
|
|
53
|
+
// console.log('🔐 Initializing auth...');
|
|
54
|
+
// // Your auth setup here
|
|
55
|
+
// },
|
|
56
|
+
|
|
57
|
+
// Example 2: Load environment config
|
|
58
|
+
// async function loadConfig() {
|
|
59
|
+
// console.log('⚙️ Loading environment config...');
|
|
60
|
+
// // Your config loading here
|
|
61
|
+
// },
|
|
62
|
+
|
|
63
|
+
// Example 3: Set up analytics
|
|
64
|
+
// async function setupAnalytics() {
|
|
65
|
+
// console.log('📊 Setting up analytics...');
|
|
66
|
+
// // Your analytics setup here
|
|
67
|
+
// }
|
|
68
|
+
]
|
|
69
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "juxscript",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A JavaScript UX authorship platform",
|
|
6
6
|
"main": "lib/jux.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"machinery",
|
|
33
33
|
"presets",
|
|
34
34
|
"types",
|
|
35
|
+
"juxconfig.example.js",
|
|
35
36
|
"README.md",
|
|
36
37
|
"LICENSE"
|
|
37
38
|
],
|