coc-live-server 0.1.0 → 0.1.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/README.md CHANGED
@@ -18,6 +18,7 @@ Launch a development local Server with live reload feature for static & dynamic
18
18
  - `coc-live-server.wait`: Wait time in milliseconds before reloading the page after a file change is detected, default: `100`
19
19
  - `coc-live-server.spa`: translate requests from /abc to /#/abc (handy for Single Page Apps), default: `false`
20
20
  - `coc-live-server.index`: Default file to serve when accessing the root URL, default: `index.html`
21
+ - `coc-live-server.open`: Open the browser automatically when the server starts, default: `true`
21
22
 
22
23
  ## Commands
23
24
 
package/lib/index.js CHANGED
@@ -58,6 +58,7 @@ function startLiveServer() {
58
58
  const cors = getConfigItem("cors");
59
59
  const wait = getConfigItem("wait", 100);
60
60
  const spa = getConfigItem("spa");
61
+ const open = getConfigItem("open", true);
61
62
  const index = getConfigItem("index", "index.html");
62
63
  const STATUS = `liveServer[:${port}]`;
63
64
  const args = [];
@@ -79,6 +80,9 @@ function startLiveServer() {
79
80
  if (spa) {
80
81
  args.push(" --spa");
81
82
  }
83
+ if (!open) {
84
+ args.push(" --no-browser");
85
+ }
82
86
  if (wait && typeof wait === "number") {
83
87
  args.push(" --wait=" + wait);
84
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coc-live-server",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Launch a development local Server with live reload feature for static & dynamic pages.",
5
5
  "author": "cyl <a1008611abcd@126.com>",
6
6
  "license": "MIT",
@@ -65,6 +65,11 @@
65
65
  "type": "boolean",
66
66
  "default": false,
67
67
  "description": "translate requests from /abc to /#/abc (handy for Single Page Apps)"
68
+ },
69
+ "coc-live-server.open": {
70
+ "type": "boolean",
71
+ "default": true,
72
+ "description": "Open the browser automatically when the server starts"
68
73
  }
69
74
  }
70
75
  },