Skip to content

Commit 008c9bb

Browse files
authored
docs(module-tools): improve document format, fix some mistakes (#3701)
* docs(module-tools): fix contributing link * docs(module-tools): update getting started * docs: update esbuild case * docs: simplify container title * docs(module-tools): improve document format
1 parent d714326 commit 008c9bb

34 files changed

+219
-213
lines changed

packages/document/module-doc/docs/en/api/config/build-config.md

Lines changed: 87 additions & 87 deletions
Large diffs are not rendered by default.

packages/document/module-doc/docs/en/api/config/build-preset.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ sidebar_position: 2
66

77
A build preset string or preset function. Provides out-of-the-box build configuration
88

9-
- type: `string | Function`
10-
- default: `undefined`
9+
- Type: `string | Function`
10+
- Default: `undefined`
1111

1212
## string
1313

packages/document/module-doc/docs/en/api/config/design-system.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ This chapter describes the configuration related to designSystem
1010
The Tailwind CSS feature needs to be enabled first via `pnpm run new`.
1111
:::
1212

13-
- type: `Object`
14-
- default: `see configuration details below`.
13+
- Type: `Object`
14+
- Default: `see configuration details below`.
1515

1616
<details>
1717
<summary>designSystem configuration details</summary>

packages/document/module-doc/docs/en/api/config/plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ sidebar_position: 4
44

55
# Plugins
66

7-
This chapter describes the configuration of the registered module-tools plugin.
7+
This chapter describes the configuration of the registered Module Tools plugin.
88

9-
- type: `Array<ModuleToolsPlugin>`
9+
- Type: `Array<ModuleToolsPlugin>`
1010

1111
```js modern.config.ts
1212
import { examplePlugin } from '. /plugins/example';

packages/document/module-doc/docs/en/api/config/testing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You need to enable the unit testing feature with `pnpm run new` first.
1313
## jest
1414

1515
- Type: `Object | Function`
16-
- Default value: `{}`
16+
- Default: `{}`
1717

1818
The configuration corresponding to [Jest](https://jestjs.io/docs/configuration), when of type `Object`, can be configured with all the underlying configurations supported by Jest .
1919

@@ -48,8 +48,8 @@ export default defineConfig({
4848

4949
## transformer
5050

51-
- type: `'babel-jest' | 'ts-jest'`
52-
- Default value: `'babel-jest'`
51+
- Type: `'babel-jest' | 'ts-jest'`
52+
- Default: `'babel-jest'`
5353

5454
Configure the compilation tool for the source code when executing tests: [babel-jest](https://www.npmjs.com/package/babel-jest) or [ts-jest](https://github.com/kulshekhar/ts-jest). The default is `babel-jest`.
5555

packages/document/module-doc/docs/en/api/plugin-api/plugin-hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ export interface DevToolData {
335335
}
336336
```
337337

338-
<!-- :::tip{title='About disableRunBuild configuration'}
338+
<!-- :::tip About disableRunBuild configuration
339339
When dev a project, it may be possible to set `disableRunBuild: true` to disable build tasks for source execution (in listening mode) if you only need to dev code functionality.
340340
341341
The currently supported Storybook dev supports using source code products as dev objects, so `disableRunBuild: false` in the Storybook plugin.

packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@ sidebar_position: 1
44

55
# In-depth understanding of build
66

7-
In the [Basic Usage] section, we already knew that you can modify the output product of a project through the `buildConfig` configuration. `buildConfig` not only describes some of the features of the product, but also provides some functionality for building the product.
8-
9-
:::tip{title=notes}
10-
If you are not sure what `buildConfig` is, it is recommended to take some time to understand it by following this link.
11-
12-
- [[modify-output-product](/en/guide/basic/modify-output-product)]
7+
In the "Basic Usage" section, we already knew that you can modify the output product of a project through the `buildConfig` configuration. `buildConfig` not only describes some of the features of the product, but also provides some functionality for building the product.
138

9+
:::tip
10+
If you are not familiar with `buildConfig`, please read [modify-output-product](/en/guide/basic/modify-output-product).
1411
:::
1512

1613
In this chapter we'll dive into the use of certain build configurations and understand what happens when the `modern build` command is executed.
@@ -43,7 +40,7 @@ In `buildConfig` you can specify whether the current build task is Bundle or Bun
4340
- When `buildType: 'bundle'`, `input` defaults to `src/index.(j|t)sx?`
4441
- When `buildType: 'bundleless'`, `input` defaults to `['src']`
4542

46-
:::warning{title=notes}
43+
:::warning
4744
It is recommended that you do not specify multiple source file directories during a Bundleless build, as unintended results may occur. Bundleless builds with multiple source directories are currently in an unstable stage.
4845
:::
4946

packages/document/module-doc/docs/en/guide/basic/before-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 1
66

77
## Environment preparation
88

9-
In order to use the Modern.js module engineering solution, you first need [NodeJS](https://nodejs.org/zh/) engine, we recommend the latest [LTS version](https://github.com/nodejs/Release), and make sure the Node version is **>=14.18.0**. because non-stable NodeJS releases frequently have bugs. You might consider installing via [nvm-windows](https://github.com/coreybutler/nvm-windows) and [nvm](https://github.com/nvm-sh/nvm) (Mac/linux), so you can easily switch to different NodeJS versions that might be required for different projects that you work on.
9+
In order to use the Modern.js module engineering solution, you first need [NodeJS](https://nodejs.org/zh/) engine, we recommend the latest [LTS version](https://github.com/nodejs/Release), and make sure the Node version is **>=14.18.0**. because non-stable NodeJS releases frequently have bugs. You might consider installing via [nvm-windows](https://github.com/coreybutler/nvm-windows) and [nvm](https://github.com/nvm-sh/nvm) (Mac / Linux), so you can easily switch to different NodeJS versions that might be required for different projects that you work on.
1010

1111
## Getting Started with npm
1212

packages/document/module-doc/docs/en/guide/basic/command-preview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ When you want to start a project build, you can execute the `modern build` comma
3232

3333
In addition to the above, module projects also support `platform` build mode, which can be used to perform build tasks for other tools. For example, it is currently officially supported to start a Storybook build task to generate Storybook products by executing the `modern build --platform` or `modern build --platform storybook` commands after installing the `@modern-js/plugin-storybook` plugin.
3434

35-
:::tip{title=Note}
35+
:::tip
3636
When executing a Storybook build, if you need to read the build product of the project. Then **don't forget to execute the `modern build` command to ensure the existence of the project's build product before executing the `modern build --platform` command to start the Storybook build**.
3737
:::
3838

@@ -108,7 +108,7 @@ Run [ESLint](https://eslint.org/) to check the syntax of the code. Usually, we o
108108

109109
- The `-no-fix` argument turns off the ability to automatically fix lint error code.
110110

111-
## `-modern change`
111+
## `modern change`
112112

113113
```bash
114114
Usage: modern change [options]
@@ -185,7 +185,7 @@ Options:
185185

186186
Automatically generate [Release Note](https://en.wikipedia.org/wiki/Release_notes) based on the changeset information of the current repository.
187187

188-
:::tip{title=Note}
188+
:::tip
189189
needs to be executed before the `bump` command.
190190
:::
191191

packages/document/module-doc/docs/en/guide/basic/modify-output-product.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
sidebar_position: 3
33
---
4-
# modify-output-product
54

6-
## Modify the output product
5+
# Modify the output product
76

87
## Default output products
98

0 commit comments

Comments
 (0)