@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.
Files changed (27) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +3 -3
  3. package/en/docusaurus-plugin-content-docs/current/configure/app/deploy/microFrontend.md +54 -0
  4. package/en/docusaurus-plugin-content-docs/current/configure/app/output/ssg.md +226 -0
  5. package/en/docusaurus-plugin-content-docs/current/guides/advanced-features/ssg.md +2 -2
  6. package/en/docusaurus-plugin-content-docs/current/guides/basic-features/data-fetch.md +1 -1
  7. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/extend.md +162 -0
  8. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook-list.md +803 -0
  9. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/hook.md +169 -0
  10. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/implement.md +247 -0
  11. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/introduction.md +49 -0
  12. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/plugin-api.md +116 -0
  13. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/framework-plugin/relationship.md +118 -0
  14. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/common.md +1 -1
  15. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/module.md +3 -1
  16. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/config/mwa.md +1 -9
  17. package/en/docusaurus-plugin-content-docs/current/guides/topic-detail/generator/project.md +2 -2
  18. package/en/docusaurus-plugin-content-docs/current/tutorials/foundations/introduction.md +1 -1
  19. package/package.json +3 -3
  20. package/zh/configure/app/output/ssg.md +1 -5
  21. package/zh/guides/basic-features/data-fetch.md +1 -1
  22. package/zh/guides/basic-features/env-vars.md +1 -1
  23. package/zh/guides/topic-detail/generator/config/module.md +3 -1
  24. package/zh/guides/topic-detail/generator/config/mwa.md +1 -9
  25. package/zh/tutorials/foundations/introduction.md +1 -1
  26. package/en/docusaurus-plugin-content-docs/current/tutorials/foundations/basic.md +0 -8
  27. package/zh/tutorials/foundations/basic.md +0 -8
@@ -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
 
@@ -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)
@@ -34,20 +34,12 @@ Element name (element), supports two options:
34
34
 
35
35
  - Create customized server dir(server)
36
36
 
37
- These two options also need to be used in conjunction with the specific configuration, which is described as follows:
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 '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.
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'npx @modern-js/create ', you can use this parameter directly.
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
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: Modern.js Introduce
2
+ title: Introduce
3
3
  sidebar_position: 1
4
4
  ---
5
5
 
package/package.json CHANGED
@@ -11,20 +11,20 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-20221229053658",
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-20221229053658"
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-20221229053658"
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.config` 中做以下设置:
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
  例如以下目录结构:
@@ -425,7 +425,7 @@ export default () => {
425
425
  // 这里没有发送真实的请求,只是返回了一个写死的数据。
426
426
  // 真实项目中,应该返回从远端获取的数据。
427
427
  return {
428
- name: 'modern.js',
428
+ name: 'Modern.js',
429
429
  };
430
430
  });
431
431
 
@@ -11,7 +11,7 @@ Modern.js 提供了对环境变量的支持,包含内置的环境变量和自
11
11
 
12
12
  表示当前的执行环境,是**只读的**的环境变量,其值在不同的执行命令下具有不同的值:
13
13
 
14
- - `production`:执行 `modern build`、`modern preview` 命令时的默认值。
14
+ - `production`:执行 `modern build`、`modern serve` 命令时的默认值。
15
15
  - `test`:执行 `modern test` 命令时的默认值。
16
16
  - `development`:执行 `modern dev` 命令时的默认值,同时也是其他所有情况下的默认值。
17
17
 
@@ -34,6 +34,8 @@ New 命令的操作类型(actionType),类型支持一种:
34
34
 
35
35
  - Tailwind CSS(tailwindcss)
36
36
 
37
- - Storybook(mwa_storybook)
37
+ - Storybook(storybook)
38
38
 
39
39
  - Runtime API(runtimeApi)
40
+
41
+ - 测试(test)
@@ -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),支持如下选项:
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: Modern.js 介绍
2
+ title: 介绍
3
3
  sidebar_position: 1
4
4
  ---
5
5
 
@@ -1,8 +0,0 @@
1
- ---
2
- title: JavaScript & React
3
- sidebar_position: 2
4
- ---
5
-
6
- :::note Todo
7
- Coming Soon...
8
- :::
@@ -1,8 +0,0 @@
1
- ---
2
- title: JavaScript & React
3
- sidebar_position: 2
4
- ---
5
-
6
- :::note Todo
7
- 敬请期待
8
- :::