rspress 1.1.1 → 1.2.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/dist/index.js +6 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -68,6 +68,7 @@ var setNodeEnv = (env) => {
|
|
68
68
|
cli.option("--config [config]", "Specify the path to the config file");
|
69
69
|
cli.command("[root]", "start dev server").alias("dev").action(async (root, options) => {
|
70
70
|
setNodeEnv("development");
|
71
|
+
let isRestarting = false;
|
71
72
|
const cwd = process.cwd();
|
72
73
|
let docDirectory;
|
73
74
|
let cliWatcher;
|
@@ -95,6 +96,10 @@ cli.command("[root]", "start dev server").alias("dev").action(async (root, optio
|
|
95
96
|
);
|
96
97
|
cliWatcher.on("all", async (eventName, filepath) => {
|
97
98
|
if (eventName === "add" || eventName === "unlink" || eventName === "change" && CONFIG_FILES.includes(path2.basename(filepath))) {
|
99
|
+
if (isRestarting) {
|
100
|
+
return;
|
101
|
+
}
|
102
|
+
isRestarting = true;
|
98
103
|
console.log(
|
99
104
|
`
|
100
105
|
✨ ${eventName} ${chalk.green(
|
@@ -105,6 +110,7 @@ cli.command("[root]", "start dev server").alias("dev").action(async (root, optio
|
|
105
110
|
await devServer.close();
|
106
111
|
await cliWatcher.close();
|
107
112
|
await startDevServer();
|
113
|
+
isRestarting = false;
|
108
114
|
}
|
109
115
|
});
|
110
116
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "rspress",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.2.0",
|
4
4
|
"type": "module",
|
5
5
|
"types": "./dist/index.d.ts",
|
6
6
|
"main": "./dist/index.js",
|
@@ -32,8 +32,8 @@
|
|
32
32
|
"cac": "^6.7.14",
|
33
33
|
"chokidar": "^3.5.3",
|
34
34
|
"chalk": "5.3.0",
|
35
|
-
"@rspress/core": "1.
|
36
|
-
"@rspress/shared": "1.
|
35
|
+
"@rspress/core": "1.2.0",
|
36
|
+
"@rspress/shared": "1.2.0"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
39
|
"@types/jest": "~29.2.4",
|