coc-live-server 0.0.3 → 0.0.5
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/index.html +9 -0
- package/lib/index.js +4 -4
- package/package.json +1 -1
package/index.html
ADDED
package/lib/index.js
CHANGED
|
@@ -59,7 +59,7 @@ function startLiveServer() {
|
|
|
59
59
|
stopLiveServer(false);
|
|
60
60
|
}
|
|
61
61
|
statusItem = import_coc2.window.createStatusBarItem(0);
|
|
62
|
-
statusItem.text = "
|
|
62
|
+
statusItem.text = "LiveServer: starting";
|
|
63
63
|
statusItem.show();
|
|
64
64
|
if (port && typeof port === "number") {
|
|
65
65
|
args.push(" --port=" + port);
|
|
@@ -68,8 +68,8 @@ function startLiveServer() {
|
|
|
68
68
|
liveServerProcess = (0, import_child_process.spawn)("node", [serverModule, ...args], { shell: true });
|
|
69
69
|
if (liveServerProcess) {
|
|
70
70
|
liveServerProcess.stdout.on("data", (data) => {
|
|
71
|
-
if (statusItem && statusItem?.text !==
|
|
72
|
-
statusItem.text =
|
|
71
|
+
if (statusItem && statusItem?.text !== `liveServer[${port}]`) {
|
|
72
|
+
statusItem.text = `liveServer[:${port}]`;
|
|
73
73
|
}
|
|
74
74
|
const output = data.toString();
|
|
75
75
|
const ansiRegex = /\x1b\[[0-9;]*m/g;
|
|
@@ -77,7 +77,7 @@ function startLiveServer() {
|
|
|
77
77
|
});
|
|
78
78
|
liveServerProcess.stderr.on("data", () => {
|
|
79
79
|
if (statusItem) {
|
|
80
|
-
statusItem.text = "
|
|
80
|
+
statusItem.text = "LiveServer: error";
|
|
81
81
|
}
|
|
82
82
|
import_coc2.window.showErrorMessage(
|
|
83
83
|
"Failed to start coc-live-server. Please ensure live-server is installed."
|
package/package.json
CHANGED