@modern-js/module-tools-docs 2.54.0 → 2.54.1
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/CHANGELOG.md
CHANGED
|
@@ -70,20 +70,6 @@ The Modern.js Module provides the ability to use debugging tools, which can be s
|
|
|
70
70
|
|
|
71
71
|
The officially supported debugging tool is [Rspress](https://rspress.dev/), so you can run `modern dev` or `modern dev doc` to execute it after you run `modern new` to enable it.
|
|
72
72
|
|
|
73
|
-
## `modern test`
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
Usage: modern test [options]
|
|
77
|
-
|
|
78
|
-
Options:
|
|
79
|
-
-u --updateSnapshot use this flag to re-record snapshots.
|
|
80
|
-
--watch watch files for changes and rerun tests related to changed files.
|
|
81
|
-
-h, --help show command help
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
You need to execute `modern new` to turn on the test function before you can execute the `modern test` command.
|
|
85
|
-
The `modern test` command will automatically run the `src/tests/*.test.(js|ts|jsx|tsx)` file as a test case.
|
|
86
|
-
|
|
87
73
|
## `modern lint`
|
|
88
74
|
|
|
89
75
|
```bash
|
|
@@ -12,7 +12,6 @@ If you are planning to develop a project of the npm package type, then you came
|
|
|
12
12
|
- **Code formatting**: In Modern.js Module, you can execute `modern lint` to format the code. The initialized module project includes the [ESLint](https://eslint.org/docs/latest/user-guide/core-concepts#what-is-eslint) ruleset for Modern.js for most scenarios.
|
|
13
13
|
- **Comprehensive build capabilities and faster builds**: Modern.js Module provides high-performance build capabilities based on [esbuild](https://esbuild.github.io/getting-started/) and [SWC](https://swc.rs/), and provides rich configurations for different build scenarios.
|
|
14
14
|
- **Storybook debugging tools**: Modern.js Module provides [Storybook](https://storybook.js.org/) debugging tools for debugging module projects. After installing the Storybook plugin for Modern.js Module, you can start it with the `storybook dev` command. You can use Storybook not only for debugging components, but also for other types of modules.
|
|
15
|
-
- **Testing capabilities with Jest**: When you need to test a module, you can use the `modern test` command of Modern.js Module, which not only integrates with [Jest](https://jestjs.io/), but also provides an API for configuring [Jest](https://jestjs.io/docs/configuration).
|
|
16
15
|
- **Versioning based on Changesets**: When you need to record changes to a project, you can use the `modern change` command to generate a Markdown file containing the changes; when you need to upgrade a project, you can use the `modern bump` command to analyze and upgrade the version through the Markdown file; when you need to release a project, you can use the `modern release` command to release the project; Modern.js Module implements these commands based on [Changesets](https://github.com/changesets/changesets).
|
|
17
16
|
- **Extensible plugin mechanism**: Want to integrate additional debugging tools for your project? Or maybe you want to do some extra processing during the build process, Modern.js Module provides a plugin mechanism and plugin hooks that cover both the `dev` command and the `build` command process. You can use them to extend the capabilities of your project.
|
|
18
17
|
- **Lots more!** Modern.js Module will continue to optimize its build and debug features in the future. If there are important issues to be solved in module project building, or if a mainstream module project debugging tool or pattern emerges, then they will probably be supported by Modern.js Module.
|
|
@@ -70,20 +70,6 @@ Modern.js Module 提供了使用调试工具的能力,可以通过 `modern dev
|
|
|
70
70
|
|
|
71
71
|
目前官方支持的调试工具有 [Rspress](https://rspress.dev/),因此在你执行 `modern new` 命令开启它后,就可以执行 `modern dev` 或者 `modern dev doc` 执行它。
|
|
72
72
|
|
|
73
|
-
## `modern test`
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
Usage: modern test [options]
|
|
77
|
-
|
|
78
|
-
Options:
|
|
79
|
-
-u --updateSnapshot 使用此选项来更新快照
|
|
80
|
-
--watch 监视文件的变更并重新运行相关的测试
|
|
81
|
-
-h, --help 显示命令帮助
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
需要先执行 `modern new` 开启测试功能,然后才可以执行 `modern test` 命令。
|
|
85
|
-
`modern test` 命令会自动将 `tests/*.test.(js|ts|jsx|tsx)` 文件当做测试用例运行。
|
|
86
|
-
|
|
87
73
|
## `modern lint`
|
|
88
74
|
|
|
89
75
|
```bash
|
|
@@ -12,7 +12,6 @@ Modern.js Module 是 Modern.js 的模块工程解决方案,同时也是核心
|
|
|
12
12
|
- **代码格式化**:在模块工程项目中,你可以执行 `modern lint` 来对代码进行格式化。同时初始化的模块工程项目里包含了 Modern.js 的 [ESLint](https://eslint.org/docs/latest/user-guide/core-concepts#what-is-eslint) 规则集,可以满足大部分场景下的需求。
|
|
13
13
|
- **全面的构建能力和更快的构建速度**:Modern.js Module 基于 [esbuild](https://esbuild.github.io/getting-started/) 和 [SWC](https://swc.rs/) 提供了高性能的构建能力,并且为不同构建模块的场景提供了丰富的配置。
|
|
14
14
|
- **Storybook 调试工具**:Modern.js Module 为调试模块项目提供了 [Storybook](https://storybook.js.org/) 调试工具。在安装了 Modern.js Module 的 Storybook 插件后,你可以使用 `storybook dev` 命令来启动它。你不仅可以使用 Storybook 对组件进行调试,也可以使用在其他类型的模块上。
|
|
15
|
-
- **集成 Jest 的测试能力**:在需要对模块测试的时候,可以使用 Modern.js Module 的 `modern test` 命令。Modern.js Module 不仅集成了 [Jest](https://jestjs.io/),同时也提供了配置 [Jest](https://jestjs.io/docs/configuration) 的 API。
|
|
16
15
|
- **基于 Changesets 实现的版本管理**:当需要对项目记录变更内容的时候,可以使用 `modern change` 命令生成包含变更内容的 Markdown 文件;当需要对项目进行版本升级的时候,可以使用 `modern bump` 命令通过 Markdown 文件分析并升级版本;当需要发布项目的时候,可以使用 `modern release` 命令对项目进行发布。Modern.js Module 基于 [Changesets](https://github.com/changesets/changesets) 实现了这些命令。
|
|
17
16
|
- **可扩展性的插件机制**:想要为项目集成其他的调试工具?又或者是想要在构建过程中做一些额外处理?Modern.js Module 提供了插件机制和插件钩子,插件钩子覆盖了 `dev` 命令和 `build` 命令两个流程。你可以通过它们为项目进行能力的扩展。
|
|
18
17
|
- **还有更多**:Modern.js Module 在未来还会不断地在构建、调试功能上进行优化。如果在模块项目构建上存在需要解决的重要问题,又或者是某个主流的模块项目调试工具、模式出现的时候,那么它们很可能成为 Modern.js Module 将要支持功能。
|
package/package.json
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"directory": "packages/document/module-doc"
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "2.54.
|
|
12
|
+
"version": "2.54.1",
|
|
13
13
|
"main": "index.js",
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"react": "^18.2.0",
|
|
16
16
|
"react-dom": "^18.2.0",
|
|
17
17
|
"rspress": "1.18.2",
|
|
18
18
|
"@rspress/shared": "1.18.2",
|
|
19
|
-
"@modern-js/doc-plugin-auto-sidebar": "2.54.
|
|
19
|
+
"@modern-js/doc-plugin-auto-sidebar": "2.54.1"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"dev": "rspress dev",
|