doclific 0.2.5 → 0.2.7
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/dist/bin/doclific.js +2 -7
- package/dist/server/router.js +1 -1
- package/package.json +2 -1
- package/readme.md +1 -1
package/dist/bin/doclific.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { spawn } from 'child_process';
|
|
3
2
|
import { startServer } from '../server/index.js';
|
|
4
3
|
import { mkdir } from 'fs/promises';
|
|
5
4
|
import { existsSync } from 'fs';
|
|
6
5
|
import path from 'path';
|
|
6
|
+
import open from 'open';
|
|
7
7
|
const command = process.argv[2];
|
|
8
8
|
if (command === 'init') {
|
|
9
9
|
const cwd = process.cwd();
|
|
@@ -30,10 +30,5 @@ else {
|
|
|
30
30
|
console.log('Doclific CLI running in directory:', cwd);
|
|
31
31
|
startServer(Number(port));
|
|
32
32
|
// Optional: open browser automatically
|
|
33
|
-
|
|
34
|
-
? 'start'
|
|
35
|
-
: process.platform === 'darwin'
|
|
36
|
-
? 'open'
|
|
37
|
-
: 'xdg-open';
|
|
38
|
-
spawn(open, [`http://localhost:${port}`]);
|
|
33
|
+
open(`http://localhost:${port}`);
|
|
39
34
|
}
|
package/dist/server/router.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doclific",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"doclific": "./dist/bin/doclific.js"
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"child_process": "^1.0.2",
|
|
27
27
|
"cors": "^2.8.5",
|
|
28
28
|
"express": "^5.2.1",
|
|
29
|
+
"open": "^11.0.0",
|
|
29
30
|
"util": "^0.12.5",
|
|
30
31
|
"zod": "^4.1.13"
|
|
31
32
|
},
|
package/readme.md
CHANGED
|
@@ -34,7 +34,7 @@ This starts the Doclific web server on port `6767` by default. The server will a
|
|
|
34
34
|
|
|
35
35
|
### Custom Port
|
|
36
36
|
|
|
37
|
-
You can specify a custom port using the
|
|
37
|
+
You can specify a custom port using the `--p` or `--port` flag:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
doclific -p=8080
|