modernx-gui 1.1.2 → 1.1.3
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/modernx-gui +14 -1
- package/package.json +1 -1
package/bin/modernx-gui
CHANGED
|
@@ -4,6 +4,19 @@ const { startServer } = require('../src/lib/server');
|
|
|
4
4
|
const { detectProject } = require('../src/lib/project-detector');
|
|
5
5
|
const { openBrowser } = require('../src/lib/browser');
|
|
6
6
|
|
|
7
|
+
// Parse command line arguments
|
|
8
|
+
const args = process.argv.slice(2);
|
|
9
|
+
let port = 3000;
|
|
10
|
+
|
|
11
|
+
for (let i = 0; i < args.length; i++) {
|
|
12
|
+
if (args[i] === '--port' && i + 1 < args.length) {
|
|
13
|
+
port = parseInt(args[i + 1], 10);
|
|
14
|
+
i++;
|
|
15
|
+
} else if (args[i].startsWith('--port=')) {
|
|
16
|
+
port = parseInt(args[i].replace('--port=', ''), 10);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
7
20
|
async function main() {
|
|
8
21
|
try {
|
|
9
22
|
console.log('🚀 Starting ModernX GUI...');
|
|
@@ -14,7 +27,7 @@ async function main() {
|
|
|
14
27
|
|
|
15
28
|
// Start development server
|
|
16
29
|
const server = await startServer({
|
|
17
|
-
port:
|
|
30
|
+
port: port,
|
|
18
31
|
projectInfo,
|
|
19
32
|
});
|
|
20
33
|
|