@modern-js/main-doc 0.0.0-next-20221229053658 → 0.0.0-next-20221229140645
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +3 -3
- package/en/docusaurus-plugin-content-docs/current/configure/app/deploy/microFrontend.md +54 -0
- package/en/docusaurus-plugin-content-docs/current/configure/app/output/ssg.md +226 -0
- package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/ssg.md +2 -2
- package/en/docusaurus-plugin-content-docs/current/guides/basic-features/data-fetch.md +1 -1
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/extend.md +162 -0
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook-list.md +803 -0
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook.md +169 -0
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/implement.md +247 -0
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/introduction.md +49 -0
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/plugin-api.md +116 -0
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/relationship.md +118 -0
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/common.md +1 -1
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/module.md +3 -1
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/mwa.md +1 -9
- package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/project.md +2 -2
- package/en/docusaurus-plugin-content-docs/current/tutorials/foundations/introduction.md +1 -1
- package/package.json +3 -3
- package/zh/configure/app/output/ssg.md +1 -5
- package/zh/guides/basic-features/data-fetch.md +1 -1
- package/zh/guides/basic-features/env-vars.md +1 -1
- package/zh/guides/topic-detail/generator/config/module.md +3 -1
- package/zh/guides/topic-detail/generator/config/mwa.md +1 -9
- package/zh/tutorials/foundations/introduction.md +1 -1
- package/en/docusaurus-plugin-content-docs/current/tutorials/foundations/basic.md +0 -8
- package/zh/tutorials/foundations/basic.md +0 -8
package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/common.md
CHANGED
@@ -47,7 +47,7 @@ Package management tool (packageManager), the options are as follows:
|
|
47
47
|
In the custom type of the generator plugin to create a project scenario, only the `packageManager` configuration is provided by default.
|
48
48
|
:::
|
49
49
|
|
50
|
-
##
|
50
|
+
## Other configurations
|
51
51
|
|
52
52
|
### noNeedInstall
|
53
53
|
|
package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/module.md
CHANGED
@@ -14,7 +14,7 @@ The application project creation parameters are [Generator Configuration](/docs/
|
|
14
14
|
|
15
15
|
Package name (packageName), character string type.
|
16
16
|
|
17
|
-
## New
|
17
|
+
## New Command
|
18
18
|
|
19
19
|
The new command configuration in the module project can be used through the `--config` parameter configuration when executing the new command, or when enabling functions in the generator plugin.
|
20
20
|
|
@@ -37,3 +37,5 @@ Optional function name (function), supports the following options:
|
|
37
37
|
- Storybook(mwa_storybook)
|
38
38
|
|
39
39
|
- Runtime API(runtimeApi)
|
40
|
+
|
41
|
+
- Test(test)
|
package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/mwa.md
CHANGED
@@ -34,20 +34,12 @@ Element name (element), supports two options:
|
|
34
34
|
|
35
35
|
- Create customized server dir(server)
|
36
36
|
|
37
|
-
|
37
|
+
The entry also need to be used in conjunction with the specific configuration, which is described as follows:
|
38
38
|
|
39
39
|
#### name
|
40
40
|
|
41
41
|
Entry name (name), character `string` type.
|
42
42
|
|
43
|
-
#### framework
|
44
|
-
|
45
|
-
Customized server runtime framework(framework),supports two options::
|
46
|
-
|
47
|
-
- Express(express)
|
48
|
-
|
49
|
-
- Koa(koa)
|
50
|
-
|
51
43
|
### function
|
52
44
|
|
53
45
|
Optional function name (function), supports the following options:
|
@@ -24,7 +24,7 @@ Use npx to get the latest version of `@modern-js/create` every time.
|
|
24
24
|
|
25
25
|
Project directory name.
|
26
26
|
|
27
|
-
When executing the above command, the
|
27
|
+
When executing the above command, the `projectDir` folder will be created in the current directory by default, and the initialization project will be in this folder. When this parameter is empty, the initialization project will be directly generated in the current directory.
|
28
28
|
|
29
29
|
### --version
|
30
30
|
|
@@ -104,7 +104,7 @@ For custom generator plugins, please refer to [Development Generator Plugin](/do
|
|
104
104
|
|
105
105
|
Specifies the microgenerator.
|
106
106
|
|
107
|
-
By default, `@modern-js/create` will execute the microgenerator Modern.js framework build-in. If you need to execute a customized microgenerator, and you need to use the posture of
|
107
|
+
By default, `@modern-js/create` will execute the microgenerator Modern.js framework build-in. If you need to execute a customized microgenerator, and you need to use the posture of `npx @modern-js/create`, you can use this parameter directly.
|
108
108
|
|
109
109
|
For custom microgenerators, please refer to [Develop Microgenerator](/docs/guides/topic-detail/generator/codesmith/introduce).
|
110
110
|
|
package/package.json
CHANGED
@@ -11,20 +11,20 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "0.0.0-next-
|
14
|
+
"version": "0.0.0-next-20221229140645",
|
15
15
|
"publishConfig": {
|
16
16
|
"registry": "https://registry.npmjs.org/",
|
17
17
|
"access": "public"
|
18
18
|
},
|
19
19
|
"peerDependencies": {
|
20
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
20
|
+
"@modern-js/builder-doc": "0.0.0-next-20221229140645"
|
21
21
|
},
|
22
22
|
"devDependencies": {
|
23
23
|
"ts-node": "^10",
|
24
24
|
"fs-extra": "^10",
|
25
25
|
"@types/node": "^16",
|
26
26
|
"@types/fs-extra": "^9",
|
27
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
27
|
+
"@modern-js/builder-doc": "0.0.0-next-20221229140645"
|
28
28
|
},
|
29
29
|
"scripts": {
|
30
30
|
"build": "npx ts-node ./scripts/sync.ts"
|
@@ -35,7 +35,7 @@ sidebar_label: ssg
|
|
35
35
|
│ └── page.tsx
|
36
36
|
```
|
37
37
|
|
38
|
-
在 `modern.js
|
38
|
+
在 `modern.config.js` 中做以下设置:
|
39
39
|
|
40
40
|
```js
|
41
41
|
export default defineConfig({
|
@@ -73,10 +73,6 @@ export default () => {
|
|
73
73
|
|
74
74
|
### 多入口
|
75
75
|
|
76
|
-
:::note
|
77
|
-
多入口 SSG 暂未支持,敬请期待。
|
78
|
-
:::
|
79
|
-
|
80
76
|
`output.ssg` 也可以按照入口配置,配置生效的规则同样由入口路由方式决定。
|
81
77
|
|
82
78
|
例如以下目录结构:
|
@@ -11,7 +11,7 @@ Modern.js 提供了对环境变量的支持,包含内置的环境变量和自
|
|
11
11
|
|
12
12
|
表示当前的执行环境,是**只读的**的环境变量,其值在不同的执行命令下具有不同的值:
|
13
13
|
|
14
|
-
- `production`:执行 `modern build`、`modern
|
14
|
+
- `production`:执行 `modern build`、`modern serve` 命令时的默认值。
|
15
15
|
- `test`:执行 `modern test` 命令时的默认值。
|
16
16
|
- `development`:执行 `modern dev` 命令时的默认值,同时也是其他所有情况下的默认值。
|
17
17
|
|
@@ -34,20 +34,12 @@ New 命令的操作类型(actionType),类型支持两种:
|
|
34
34
|
|
35
35
|
- 新建自定义 Web Serve 源码目录(server)
|
36
36
|
|
37
|
-
|
37
|
+
入口还需要配置具体的配合使用,介绍如下:
|
38
38
|
|
39
39
|
#### name
|
40
40
|
|
41
41
|
入口名称(name), 字符串类型。
|
42
42
|
|
43
|
-
#### framework
|
44
|
-
|
45
|
-
自定义 Web Serve 运行时框架(framework),支持两个选项:
|
46
|
-
|
47
|
-
- Express(express)
|
48
|
-
|
49
|
-
- Koa(koa)
|
50
|
-
|
51
43
|
### function
|
52
44
|
|
53
45
|
可选功能名称(function),支持如下选项:
|