@modern-js/main-doc 0.0.0-nightly-20240924170708 → 0.0.0-nightly-20240925070419

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.
@@ -153,28 +153,9 @@ The `--config` parameter needs to use a JSON string.
153
153
  pnpm does not support the use of JSON strings as parameter values currently. Use `npm new` to turn on.【[Relate Issue](https://github.com/pnpm/pnpm/issues/3876)】
154
154
  :::
155
155
 
156
- ## modern serve
156
+ import ServeCommand from "@site-docs-en/components/serve-command";
157
157
 
158
- The `modern serve` command is used to start a Modern.js project in the production environment. It can also be used to preview the artifacts built for the production environment locally. Please note that you need to execute the [`build`](/apis/app/commands#modern-build) command beforehand to generate the corresponding artifacts.
159
-
160
- ```bash
161
- Usage: modern serve [options]
162
-
163
- Options:
164
- -c --config <config> specify the configuration file, which can be a relative or absolute path
165
- -h, --help show command help
166
- --api-only only run API service
167
- ```
168
-
169
- By default, the project will run in `localhost:8080`, you can modify the server port number with `server.port`:
170
-
171
- ```js
172
- export default defineConfig({
173
- server: {
174
- port: 8081,
175
- },
176
- });
177
- ```
158
+ <ServeCommand />
178
159
 
179
160
  ## modern upgrade
180
161
 
@@ -252,4 +233,4 @@ Inspect config succeed, open following files to view the content:
252
233
 
253
234
  import DeployCommand from "@site-docs-en/components/deploy-command";
254
235
 
255
- <DeployCommand />
236
+ <DeployCommand />
@@ -0,0 +1,22 @@
1
+ ## modern serve
2
+
3
+ The `modern serve` command is used to start a Modern.js project in the production environment. It can also be used to preview the artifacts built for the production environment locally. Please note that you need to execute the [`build`](/apis/app/commands#modern-build) command beforehand to generate the corresponding artifacts.
4
+
5
+ ```bash
6
+ Usage: modern serve [options]
7
+
8
+ Options:
9
+ -c --config <config> specify the configuration file, which can be a relative or absolute path
10
+ -h, --help show command help
11
+ --api-only only run API service
12
+ ```
13
+
14
+ By default, the project will run in `localhost:8080`, you can modify the server port number with `server.port`:
15
+
16
+ ```js
17
+ export default defineConfig({
18
+ server: {
19
+ port: 8081,
20
+ },
21
+ });
22
+ ```
@@ -153,28 +153,9 @@ pnpm 暂不支持使用 JSON 字符串作为参数值,可使用 `npm new` 开
153
153
 
154
154
  :::
155
155
 
156
- ## modern serve
156
+ import ServeCommand from "@site-docs/components/serve-command";
157
157
 
158
- `modern serve` 命令用于在生产环境下启动 Modern.js 工程, 也可以用于在本地预览生产环境构建的产物。注意你需要提前执行 [`build`](/apis/app/commands#modern-build) 命令构建出对应产物。
159
-
160
- ```bash
161
- Usage: modern serve [options]
162
-
163
- Options:
164
- -c --config <config> 指定配置文件路径,可以为相对路径或绝对路径
165
- -h, --help 显示命令帮助
166
- --api-only 仅启动 API 接口服务
167
- ```
168
-
169
- 默认情况下,应用将会在 `localhost:8080` 启动,可以通过 `server.port` 修改 Server 端口号:
170
-
171
- ```js
172
- export default defineConfig({
173
- server: {
174
- port: 8081,
175
- },
176
- });
177
- ```
158
+ <ServeCommand />
178
159
 
179
160
  ## modern upgrade
180
161
 
@@ -252,4 +233,4 @@ Inspect config succeed, open following files to view the content:
252
233
 
253
234
  import DeployCommand from "@site-docs/components/deploy-command";
254
235
 
255
- <DeployCommand />
236
+ <DeployCommand />
@@ -0,0 +1,22 @@
1
+ ## modern serve
2
+
3
+ `modern serve` 命令用于在生产环境下启动 Modern.js 工程, 也可以用于在本地预览生产环境构建的产物。注意你需要提前执行 [`build`](/apis/app/commands#modern-build) 命令构建出对应产物。
4
+
5
+ ```bash
6
+ Usage: modern serve [options]
7
+
8
+ Options:
9
+ -c --config <config> 指定配置文件路径,可以为相对路径或绝对路径
10
+ -h, --help 显示命令帮助
11
+ --api-only 仅启动 API 接口服务
12
+ ```
13
+
14
+ 默认情况下,应用将会在 `localhost:8080` 启动,可以通过 `server.port` 修改 Server 端口号:
15
+
16
+ ```js
17
+ export default defineConfig({
18
+ server: {
19
+ port: 8081,
20
+ },
21
+ });
22
+ ```
package/package.json CHANGED
@@ -15,14 +15,14 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-nightly-20240924170708",
18
+ "version": "0.0.0-nightly-20240925070419",
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",
21
21
  "access": "public",
22
22
  "provenance": true
23
23
  },
24
24
  "dependencies": {
25
- "@modern-js/sandpack-react": "0.0.0-nightly-20240924170708"
25
+ "@modern-js/sandpack-react": "0.0.0-nightly-20240925070419"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@rspress/shared": "1.31.0",