prev-cli 0.17.0 → 0.17.1
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/cli.js +3 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1389,6 +1389,7 @@ function handleConfig(rootDir2, subcommand) {
|
|
|
1389
1389
|
`);
|
|
1390
1390
|
process.exit(1);
|
|
1391
1391
|
}
|
|
1392
|
+
const randomPort = 3000 + Math.floor(Math.random() * 6000);
|
|
1392
1393
|
const configContent = `# prev-cli configuration
|
|
1393
1394
|
# See: https://github.com/lagz0ne/prev-cli
|
|
1394
1395
|
|
|
@@ -1398,8 +1399,8 @@ theme: system
|
|
|
1398
1399
|
# Content width: constrained | full
|
|
1399
1400
|
contentWidth: constrained
|
|
1400
1401
|
|
|
1401
|
-
# Port for dev server (
|
|
1402
|
-
|
|
1402
|
+
# Port for dev server (can be overridden with -p flag)
|
|
1403
|
+
port: ${randomPort}
|
|
1403
1404
|
|
|
1404
1405
|
# Hidden pages (glob patterns)
|
|
1405
1406
|
hidden: []
|