rspress 0.0.0-nightly-20231004160137 → 0.0.0-nightly-20231006160359

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -78,6 +78,12 @@ cli.command("[root]", "start dev server").alias("dev").action(async (root, optio
78
78
  let devServer;
79
79
  const startDevServer = async () => {
80
80
  const config = await loadConfigFile(options.config);
81
+ if (config.root && !path2.isAbsolute(config.root)) {
82
+ config.root = path2.join(cwd, config.root);
83
+ }
84
+ if (root) {
85
+ config.root = path2.join(cwd, root);
86
+ }
81
87
  docDirectory = config.root || path2.join(cwd, root ?? "docs");
82
88
  devServer = await dev({
83
89
  appDirectory: cwd,
@@ -118,6 +124,9 @@ cli.command("build [root]").option("-c --config <config>", "specify config file"
118
124
  setNodeEnv("production");
119
125
  const cwd = process.cwd();
120
126
  const config = await loadConfigFile(options.config);
127
+ if (root) {
128
+ config.root = path2.join(cwd, root);
129
+ }
121
130
  await build({
122
131
  appDirectory: cwd,
123
132
  docDirectory: config.root || path2.join(cwd, root ?? "docs"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rspress",
3
- "version": "0.0.0-nightly-20231004160137",
3
+ "version": "0.0.0-nightly-20231006160359",
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": "0.0.0-nightly-20231004160137",
36
- "@rspress/shared": "0.0.0-nightly-20231004160137"
35
+ "@rspress/core": "0.0.0-nightly-20231006160359",
36
+ "@rspress/shared": "0.0.0-nightly-20231006160359"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/jest": "~29.2.4",