coc-live-server 0.0.9 → 0.1.0
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 +9 -8
- package/lib/index.js +3 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -12,17 +12,18 @@ Launch a development local Server with live reload feature for static & dynamic
|
|
|
12
12
|
## Configuration options
|
|
13
13
|
|
|
14
14
|
- `coc-live-server.enabled`: Enable coc-live-server extension, default: `true`
|
|
15
|
-
- `coc-live-server.host`: server
|
|
16
|
-
- `coc-live-server.port`: server
|
|
17
|
-
- `coc-live-server.cors`:
|
|
18
|
-
- `coc-live-server.wait`:
|
|
19
|
-
- `coc-live-server.
|
|
15
|
+
- `coc-live-server.host`: Host for the live server, default: `0.0.0.0`
|
|
16
|
+
- `coc-live-server.port`: Port number for the live server, default: `8080`
|
|
17
|
+
- `coc-live-server.cors`: Enable CORS for the live server, default: `false`
|
|
18
|
+
- `coc-live-server.wait`: Wait time in milliseconds before reloading the page after a file change is detected, default: `100`
|
|
19
|
+
- `coc-live-server.spa`: translate requests from /abc to /#/abc (handy for Single Page Apps), default: `false`
|
|
20
|
+
- `coc-live-server.index`: Default file to serve when accessing the root URL, default: `index.html`
|
|
20
21
|
|
|
21
22
|
## Commands
|
|
22
23
|
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
24
|
+
- `live-server.toggle`: Toggle Live Server
|
|
25
|
+
- `live-server.start`: Start Live Server
|
|
26
|
+
- `live-server.stop`: Stop Live Server
|
|
26
27
|
|
|
27
28
|
---
|
|
28
29
|
|
package/lib/index.js
CHANGED
|
@@ -148,13 +148,13 @@ async function activate(context) {
|
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
context.subscriptions.push(
|
|
151
|
-
import_coc3.commands.registerCommand("
|
|
151
|
+
import_coc3.commands.registerCommand("live-server.start", () => {
|
|
152
152
|
startLiveServer();
|
|
153
153
|
}),
|
|
154
|
-
import_coc3.commands.registerCommand("
|
|
154
|
+
import_coc3.commands.registerCommand("live-server.stop", () => {
|
|
155
155
|
stopLiveServer();
|
|
156
156
|
}),
|
|
157
|
-
import_coc3.commands.registerCommand("
|
|
157
|
+
import_coc3.commands.registerCommand("live-server.toggle", () => {
|
|
158
158
|
toggleLiveServer();
|
|
159
159
|
})
|
|
160
160
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coc-live-server",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
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",
|
|
@@ -70,15 +70,15 @@
|
|
|
70
70
|
},
|
|
71
71
|
"commands": [
|
|
72
72
|
{
|
|
73
|
-
"command": "
|
|
73
|
+
"command": "live-server.start",
|
|
74
74
|
"title": "Start Live Server"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
"command": "
|
|
77
|
+
"command": "live-server.stop",
|
|
78
78
|
"title": "Stop Live Server"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
|
-
"command": "
|
|
81
|
+
"command": "live-server.toggle",
|
|
82
82
|
"title": "Toggle Live Server"
|
|
83
83
|
}
|
|
84
84
|
]
|