@modern-js/module-tools-docs 2.0.0-beta.4 → 2.0.2
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/.eslintrc.js +13 -0
- package/doc_build/html/main/index.html +16 -0
- package/doc_build/route.json +10 -0
- package/doc_build/static/css/main.css +3370 -0
- package/doc_build/static/css/main.css.map +1 -0
- package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css +85 -0
- package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css.map +1 -0
- package/doc_build/static/js/async/api_.js +56 -0
- package/doc_build/static/js/async/api_.js.map +1 -0
- package/doc_build/static/js/async/api_config_build-config.js +11309 -0
- package/doc_build/static/js/async/api_config_build-config.js.map +1 -0
- package/doc_build/static/js/async/api_config_build-preset.js +7849 -0
- package/doc_build/static/js/async/api_config_build-preset.js.map +1 -0
- package/doc_build/static/js/async/api_config_design-system.js +48708 -0
- package/doc_build/static/js/async/api_config_design-system.js.map +1 -0
- package/doc_build/static/js/async/api_config_plugins.js +1492 -0
- package/doc_build/static/js/async/api_config_plugins.js.map +1 -0
- package/doc_build/static/js/async/api_config_testing.js +2130 -0
- package/doc_build/static/js/async/api_config_testing.js.map +1 -0
- package/doc_build/static/js/async/api_plugin-api_plugin-hooks.js +14394 -0
- package/doc_build/static/js/async/api_plugin-api_plugin-hooks.js.map +1 -0
- package/doc_build/static/js/async/en_.js +85 -0
- package/doc_build/static/js/async/en_.js.map +1 -0
- package/doc_build/static/js/async/en_api_.js +55 -0
- package/doc_build/static/js/async/en_api_.js.map +1 -0
- package/doc_build/static/js/async/en_api_config_build-config.js +8363 -0
- package/doc_build/static/js/async/en_api_config_build-config.js.map +1 -0
- package/doc_build/static/js/async/en_api_config_build-preset.js +7845 -0
- package/doc_build/static/js/async/en_api_config_build-preset.js.map +1 -0
- package/doc_build/static/js/async/en_api_config_design-system.js +16345 -0
- package/doc_build/static/js/async/en_api_config_design-system.js.map +1 -0
- package/doc_build/static/js/async/en_api_config_plugins.js +1492 -0
- package/doc_build/static/js/async/en_api_config_plugins.js.map +1 -0
- package/doc_build/static/js/async/en_api_config_testing.js +2137 -0
- package/doc_build/static/js/async/en_api_config_testing.js.map +1 -0
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js +14362 -0
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js.map +1 -0
- package/doc_build/static/js/async/en_guide_advance_asset.js +3997 -0
- package/doc_build/static/js/async/en_guide_advance_asset.js.map +1 -0
- package/doc_build/static/js/async/en_guide_advance_build-umd.js +9861 -0
- package/doc_build/static/js/async/en_guide_advance_build-umd.js.map +1 -0
- package/doc_build/static/js/async/en_guide_advance_copy.js +6539 -0
- package/doc_build/static/js/async/en_guide_advance_copy.js.map +1 -0
- package/doc_build/static/js/async/en_guide_advance_external-dependency.js +3810 -0
- package/doc_build/static/js/async/en_guide_advance_external-dependency.js.map +1 -0
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js +5046 -0
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js.map +1 -0
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js +150 -0
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js.map +1 -0
- package/doc_build/static/js/async/en_guide_advance_theme-config.js +2484 -0
- package/doc_build/static/js/async/en_guide_advance_theme-config.js.map +1 -0
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.js +3671 -0
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.js.map +1 -0
- package/doc_build/static/js/async/en_guide_basic_command-preview.js +3961 -0
- package/doc_build/static/js/async/en_guide_basic_command-preview.js.map +1 -0
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.js +2970 -0
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.js.map +1 -0
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.js +2182 -0
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.js.map +1 -0
- package/doc_build/static/js/async/en_guide_basic_test-your-project.js +3892 -0
- package/doc_build/static/js/async/en_guide_basic_test-your-project.js.map +1 -0
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js +168 -0
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js.map +1 -0
- package/doc_build/static/js/async/en_guide_basic_using-storybook.js +4762 -0
- package/doc_build/static/js/async/en_guide_basic_using-storybook.js.map +1 -0
- package/doc_build/static/js/async/en_guide_best-practices_components.js +21388 -0
- package/doc_build/static/js/async/en_guide_best-practices_components.js.map +1 -0
- package/doc_build/static/js/async/en_guide_intro_getting-started.js +1906 -0
- package/doc_build/static/js/async/en_guide_intro_getting-started.js.map +1 -0
- package/doc_build/static/js/async/en_guide_intro_welcome.js +148 -0
- package/doc_build/static/js/async/en_guide_intro_welcome.js.map +1 -0
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js +92 -0
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js.map +1 -0
- package/doc_build/static/js/async/en_plugins_guide_getting-started.js +2560 -0
- package/doc_build/static/js/async/en_plugins_guide_getting-started.js.map +1 -0
- package/doc_build/static/js/async/en_plugins_guide_plugin-object.js +4177 -0
- package/doc_build/static/js/async/en_plugins_guide_plugin-object.js.map +1 -0
- package/doc_build/static/js/async/en_plugins_guide_setup-function.js +3819 -0
- package/doc_build/static/js/async/en_plugins_guide_setup-function.js.map +1 -0
- package/doc_build/static/js/async/en_plugins_official-list_overview.js +70 -0
- package/doc_build/static/js/async/en_plugins_official-list_overview.js.map +1 -0
- package/doc_build/static/js/async/guide_advance_asset.js +3997 -0
- package/doc_build/static/js/async/guide_advance_asset.js.map +1 -0
- package/doc_build/static/js/async/guide_advance_build-umd.js +9863 -0
- package/doc_build/static/js/async/guide_advance_build-umd.js.map +1 -0
- package/doc_build/static/js/async/guide_advance_copy.js +6539 -0
- package/doc_build/static/js/async/guide_advance_copy.js.map +1 -0
- package/doc_build/static/js/async/guide_advance_external-dependency.js +3812 -0
- package/doc_build/static/js/async/guide_advance_external-dependency.js.map +1 -0
- package/doc_build/static/js/async/guide_advance_in-depth-about-build.js +5046 -0
- package/doc_build/static/js/async/guide_advance_in-depth-about-build.js.map +1 -0
- package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js +152 -0
- package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js.map +1 -0
- package/doc_build/static/js/async/guide_advance_theme-config.js +2475 -0
- package/doc_build/static/js/async/guide_advance_theme-config.js.map +1 -0
- package/doc_build/static/js/async/guide_basic_before-getting-started.js +3662 -0
- package/doc_build/static/js/async/guide_basic_before-getting-started.js.map +1 -0
- package/doc_build/static/js/async/guide_basic_command-preview.js +3793 -0
- package/doc_build/static/js/async/guide_basic_command-preview.js.map +1 -0
- package/doc_build/static/js/async/guide_basic_modify-output-product.js +2949 -0
- package/doc_build/static/js/async/guide_basic_modify-output-product.js.map +1 -0
- package/doc_build/static/js/async/guide_basic_publish-your-project.js +2243 -0
- package/doc_build/static/js/async/guide_basic_publish-your-project.js.map +1 -0
- package/doc_build/static/js/async/guide_basic_test-your-project.js +3892 -0
- package/doc_build/static/js/async/guide_basic_test-your-project.js.map +1 -0
- package/doc_build/static/js/async/guide_basic_use-micro-generator.js +172 -0
- package/doc_build/static/js/async/guide_basic_use-micro-generator.js.map +1 -0
- package/doc_build/static/js/async/guide_basic_using-storybook.js +4762 -0
- package/doc_build/static/js/async/guide_basic_using-storybook.js.map +1 -0
- package/doc_build/static/js/async/guide_best-practices_components.js +21088 -0
- package/doc_build/static/js/async/guide_best-practices_components.js.map +1 -0
- package/doc_build/static/js/async/guide_intro_getting-started.js +1782 -0
- package/doc_build/static/js/async/guide_intro_getting-started.js.map +1 -0
- package/doc_build/static/js/async/guide_intro_welcome.js +148 -0
- package/doc_build/static/js/async/guide_intro_welcome.js.map +1 -0
- package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js +92 -0
- package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js.map +1 -0
- package/doc_build/static/js/async/index.js +85 -0
- package/doc_build/static/js/async/index.js.map +1 -0
- package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js +447 -0
- package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js.map +1 -0
- package/doc_build/static/js/async/plugins_guide_getting-started.js +2608 -0
- package/doc_build/static/js/async/plugins_guide_getting-started.js.map +1 -0
- package/doc_build/static/js/async/plugins_guide_plugin-object.js +4173 -0
- package/doc_build/static/js/async/plugins_guide_plugin-object.js.map +1 -0
- package/doc_build/static/js/async/plugins_guide_setup-function.js +3819 -0
- package/doc_build/static/js/async/plugins_guide_setup-function.js.map +1 -0
- package/doc_build/static/js/async/plugins_official-list_overview.js +70 -0
- package/doc_build/static/js/async/plugins_official-list_overview.js.map +1 -0
- package/doc_build/static/js/async/vendors-node_modules_pnpm_code-hike_mdx_0_7_4_react_18_2_0_node_modules_code-hike_mdx_dist_co-06dd41.js +6656 -0
- package/doc_build/static/js/async/vendors-node_modules_pnpm_code-hike_mdx_0_7_4_react_18_2_0_node_modules_code-hike_mdx_dist_co-06dd41.js.map +1 -0
- package/doc_build/static/js/async/vendors-node_modules_pnpm_flexsearch_0_6_32_node_modules_flexsearch_dist_flexsearch_min_js.js +54 -0
- package/doc_build/static/js/async/vendors-node_modules_pnpm_flexsearch_0_6_32_node_modules_flexsearch_dist_flexsearch_min_js.js.map +1 -0
- package/doc_build/static/js/builder-runtime.js +1375 -0
- package/doc_build/static/js/builder-runtime.js.map +1 -0
- package/doc_build/static/js/lib-lodash.js +4907 -0
- package/doc_build/static/js/lib-lodash.js.map +1 -0
- package/doc_build/static/js/lib-polyfill.js +24769 -0
- package/doc_build/static/js/lib-polyfill.js.map +1 -0
- package/doc_build/static/js/lib-react.js +39510 -0
- package/doc_build/static/js/lib-react.js.map +1 -0
- package/doc_build/static/js/main.js +9237 -0
- package/doc_build/static/js/main.js.map +1 -0
- package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js +8532 -0
- package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js.map +1 -0
- package/docs/en/api/config/_category_.json +4 -0
- package/docs/en/api/{build-config.md → config/build-config.md} +201 -108
- package/docs/en/api/{build-preset.md → config/build-preset.md} +65 -46
- package/docs/{zh/api → en/api/config}/design-system.md +130 -127
- package/docs/en/api/config/plugins.md +18 -0
- package/docs/en/api/{test.md → config/testing.md} +21 -12
- package/docs/en/api/index.md +3 -1
- package/docs/en/api/plugin-api/_category_.json +4 -0
- package/docs/en/api/plugin-api/plugin-hooks.md +501 -0
- package/docs/en/guide/advance/_category_.json +4 -0
- package/docs/en/guide/advance/asset.mdx +48 -31
- package/docs/en/guide/advance/build-umd.mdx +91 -83
- package/docs/en/guide/advance/copy.md +33 -30
- package/docs/en/guide/advance/external-dependency.mdx +27 -23
- package/docs/en/guide/advance/in-depth-about-build.md +61 -55
- package/docs/en/guide/advance/in-depth-about-dev-command.md +7 -4
- package/docs/en/guide/advance/theme-config.mdx +80 -0
- package/docs/en/guide/basic/_category_.json +4 -0
- package/docs/en/guide/basic/before-getting-started.md +29 -24
- package/docs/en/guide/basic/command-preview.md +20 -16
- package/docs/en/guide/basic/modify-output-product.md +45 -37
- package/docs/en/guide/basic/publish-your-project.md +21 -19
- package/docs/en/guide/basic/test-your-project.mdx +23 -18
- package/docs/en/guide/basic/use-micro-generator.md +15 -8
- package/docs/en/guide/basic/using-storybook.mdx +29 -26
- package/docs/en/guide/best-practices/_category_.json +4 -0
- package/docs/en/guide/best-practices/components.mdx +789 -0
- package/docs/en/guide/intro/_category_.json +4 -0
- package/docs/en/guide/intro/getting-started.md +11 -6
- package/docs/en/guide/intro/welcome.md +4 -0
- package/docs/en/guide/intro/why-module-engineering-solution.md +5 -1
- package/docs/en/index.md +15 -20
- package/docs/en/plugins/guide/_category_.json +4 -0
- package/docs/en/plugins/guide/getting-started.mdx +84 -0
- package/docs/en/plugins/guide/plugin-object.mdx +85 -0
- package/docs/en/plugins/guide/setup-function.mdx +117 -0
- package/docs/en/plugins/official-list/_category_.json +4 -0
- package/docs/en/plugins/official-list/overview.md +6 -0
- package/docs/zh/api/config/_category_.json +4 -0
- package/docs/zh/api/config/build-config.md +669 -0
- package/docs/zh/api/{build-preset.md → config/build-preset.md} +49 -36
- package/docs/zh/api/config/design-system.md +1166 -0
- package/docs/zh/api/config/plugins.md +18 -0
- package/docs/zh/api/{testing.md → config/testing.md} +18 -13
- package/docs/zh/api/index.md +5 -1
- package/docs/zh/api/plugin-api/_category_.json +4 -0
- package/docs/zh/api/plugin-api/plugin-hooks.md +501 -0
- package/docs/zh/guide/advance/_category_.json +4 -0
- package/docs/zh/guide/advance/asset.mdx +48 -31
- package/docs/zh/guide/advance/build-umd.mdx +91 -74
- package/docs/zh/guide/advance/copy.md +33 -30
- package/docs/zh/guide/advance/external-dependency.mdx +28 -24
- package/docs/zh/guide/advance/in-depth-about-build.md +60 -55
- package/docs/zh/guide/advance/in-depth-about-dev-command.md +7 -4
- package/docs/zh/guide/advance/theme-config.mdx +78 -0
- package/docs/zh/guide/basic/_category_.json +4 -0
- package/docs/zh/guide/basic/before-getting-started.md +28 -23
- package/docs/zh/guide/basic/command-preview.md +19 -15
- package/docs/zh/guide/basic/modify-output-product.md +45 -38
- package/docs/zh/guide/basic/publish-your-project.md +22 -17
- package/docs/zh/guide/basic/test-your-project.mdx +24 -18
- package/docs/zh/guide/basic/use-micro-generator.md +12 -9
- package/docs/zh/guide/basic/using-storybook.mdx +29 -24
- package/docs/zh/guide/best-practices/_category_.json +4 -0
- package/docs/zh/guide/best-practices/components.mdx +793 -0
- package/docs/zh/guide/intro/_category_.json +4 -0
- package/docs/zh/guide/intro/getting-started.md +12 -6
- package/docs/zh/guide/intro/welcome.md +4 -0
- package/docs/zh/guide/intro/why-module-engineering-solution.md +5 -1
- package/docs/zh/index.md +3 -2
- package/docs/zh/plugins/guide/_category_.json +4 -0
- package/docs/zh/plugins/guide/getting-started.mdx +84 -0
- package/docs/zh/plugins/guide/plugin-object.mdx +85 -0
- package/docs/zh/plugins/guide/setup-function.mdx +117 -0
- package/docs/zh/plugins/official-list/_category_.json +4 -0
- package/docs/zh/plugins/official-list/overview.md +5 -0
- package/modern.config.ts +119 -0
- package/package.json +8 -6
- package/{docs/.island/styles → theme}/index.css +0 -1
- package/theme/index.ts +4 -0
- package/tsconfig.json +7 -0
- package/docs/.island/config.ts +0 -245
- package/docs/.island/dist/404.html +0 -41
- package/docs/.island/dist/assets/before-getting-started.1b82b538.js +0 -87
- package/docs/.island/dist/assets/before-getting-started.582a31cc.js +0 -87
- package/docs/.island/dist/assets/build-config.72eb0918.js +0 -804
- package/docs/.island/dist/assets/build-config.d8bb1658.js +0 -809
- package/docs/.island/dist/assets/build-preset.96805d7d.js +0 -256
- package/docs/.island/dist/assets/build-preset.c20dcd40.js +0 -256
- package/docs/.island/dist/assets/build-your-ui.7f349247.js +0 -2
- package/docs/.island/dist/assets/build-your-ui.a8361604.js +0 -2
- package/docs/.island/dist/assets/command-preview.2d45fc82.js +0 -264
- package/docs/.island/dist/assets/command-preview.dc51b953.js +0 -264
- package/docs/.island/dist/assets/components.esm.03560353.js +0 -9
- package/docs/.island/dist/assets/design-system.86694ff5.js +0 -1254
- package/docs/.island/dist/assets/design-system.c4745cce.js +0 -639
- package/docs/.island/dist/assets/dev.1d326a37.js +0 -37
- package/docs/.island/dist/assets/dev.1fd06000.js +0 -37
- package/docs/.island/dist/assets/down.f35427d3.svg +0 -1
- package/docs/.island/dist/assets/extension.12299fd6.js +0 -2
- package/docs/.island/dist/assets/extension.96dc63a4.js +0 -2
- package/docs/.island/dist/assets/getting-started.40e9218d.js +0 -117
- package/docs/.island/dist/assets/getting-started.b1ed3f10.js +0 -114
- package/docs/.island/dist/assets/github.3bf8ccee.svg +0 -1
- package/docs/.island/dist/assets/index.2b2347ea.js +0 -33
- package/docs/.island/dist/assets/index.6cef6f5f.js +0 -4
- package/docs/.island/dist/assets/index.cb118238.js +0 -36
- package/docs/.island/dist/assets/index.ccb6ce27.js +0 -4
- package/docs/.island/dist/assets/island_inject.11a12ecc.js +0 -1
- package/docs/.island/dist/assets/island_inject.b13deaee.js +0 -1
- package/docs/.island/dist/assets/loading.8c9bb911.svg +0 -1
- package/docs/.island/dist/assets/modify-output-product.7f6bff35.js +0 -100
- package/docs/.island/dist/assets/modify-output-product.b91eff1f.js +0 -100
- package/docs/.island/dist/assets/moon.6b705924.svg +0 -3
- package/docs/.island/dist/assets/plugin.895932d8.js +0 -42
- package/docs/.island/dist/assets/plugin.d2fbc531.js +0 -42
- package/docs/.island/dist/assets/publish-your-project.21b8309f.js +0 -164
- package/docs/.island/dist/assets/publish-your-project.8d398b17.js +0 -166
- package/docs/.island/dist/assets/right.89674cd7.svg +0 -1
- package/docs/.island/dist/assets/search.0aea6901.svg +0 -1
- package/docs/.island/dist/assets/search.1c85d17c.js +0 -3
- package/docs/.island/dist/assets/search.484eca11.js +0 -222
- package/docs/.island/dist/assets/search.54fca8d0.js +0 -3
- package/docs/.island/dist/assets/style.09015a4b.css +0 -1
- package/docs/.island/dist/assets/style.2e5f7bc2.css +0 -1970
- package/docs/.island/dist/assets/sun.841dac10.svg +0 -11
- package/docs/.island/dist/assets/test-your-project.18bd4582.js +0 -190
- package/docs/.island/dist/assets/test-your-project.f53bebf7.js +0 -190
- package/docs/.island/dist/assets/test.0da1f99f.js +0 -67
- package/docs/.island/dist/assets/test.0e81f002.js +0 -66
- package/docs/.island/dist/assets/translator.b1077c44.svg +0 -1
- package/docs/.island/dist/assets/use-micro-generator.7d9e4016.js +0 -60
- package/docs/.island/dist/assets/use-micro-generator.db5520c1.js +0 -60
- package/docs/.island/dist/assets/using-storybook.57ea6b77.js +0 -260
- package/docs/.island/dist/assets/using-storybook.a2212f2e.js +0 -260
- package/docs/.island/dist/assets/welcome.0449a9c8.js +0 -13
- package/docs/.island/dist/assets/welcome.a8448931.js +0 -13
- package/docs/.island/dist/assets/why-module-engineering-solution.6ae8c0e3.js +0 -26
- package/docs/.island/dist/assets/why-module-engineering-solution.c9a45cbd.js +0 -26
- package/docs/.island/dist/chunk-COLCRJ2V.js +0 -1
- package/docs/.island/dist/chunk-K5FMOYDC.js +0 -10
- package/docs/.island/dist/chunk-WE42KMYS.js +0 -26
- package/docs/.island/dist/client-entry.js +0 -3
- package/docs/.island/dist/en/api/build-config.html +0 -344
- package/docs/.island/dist/en/api/build-preset.html +0 -82
- package/docs/.island/dist/en/api/design-system.html +0 -155
- package/docs/.island/dist/en/api/dev.html +0 -45
- package/docs/.island/dist/en/api/index.html +0 -41
- package/docs/.island/dist/en/api/plugin.html +0 -48
- package/docs/.island/dist/en/api/test.html +0 -58
- package/docs/.island/dist/en/guide/before-getting-started.html +0 -127
- package/docs/.island/dist/en/guide/build-your-ui.html +0 -41
- package/docs/.island/dist/en/guide/command-preview.html +0 -100
- package/docs/.island/dist/en/guide/extension.html +0 -41
- package/docs/.island/dist/en/guide/getting-started.html +0 -76
- package/docs/.island/dist/en/guide/modify-output-product.html +0 -140
- package/docs/.island/dist/en/guide/publish-your-project.html +0 -91
- package/docs/.island/dist/en/guide/test-your-project.html +0 -72
- package/docs/.island/dist/en/guide/use-micro-generator.html +0 -65
- package/docs/.island/dist/en/guide/using-storybook.html +0 -113
- package/docs/.island/dist/en/guide/welcome.html +0 -53
- package/docs/.island/dist/en/guide/why-module-engineering-solution.html +0 -49
- package/docs/.island/dist/en/index.html +0 -42
- package/docs/.island/dist/react-dom.js +0 -1
- package/docs/.island/dist/react-dom_client.js +0 -1
- package/docs/.island/dist/react.js +0 -1
- package/docs/.island/dist/react_jsx-runtime.js +0 -10
- package/docs/.island/dist/ssr-manifest.json +0 -57
- package/docs/.island/dist/test-result.png +0 -0
- package/docs/.island/dist/why-module-solution.png +0 -0
- package/docs/.island/dist/zh/api/build-config.html +0 -347
- package/docs/.island/dist/zh/api/build-preset.html +0 -82
- package/docs/.island/dist/zh/api/design-system.html +0 -149
- package/docs/.island/dist/zh/api/dev.html +0 -46
- package/docs/.island/dist/zh/api/index.html +0 -41
- package/docs/.island/dist/zh/api/plugin.html +0 -48
- package/docs/.island/dist/zh/api/test.html +0 -59
- package/docs/.island/dist/zh/guide/before-getting-started.html +0 -127
- package/docs/.island/dist/zh/guide/build-your-ui.html +0 -41
- package/docs/.island/dist/zh/guide/command-preview.html +0 -100
- package/docs/.island/dist/zh/guide/extension.html +0 -41
- package/docs/.island/dist/zh/guide/getting-started.html +0 -79
- package/docs/.island/dist/zh/guide/modify-output-product.html +0 -140
- package/docs/.island/dist/zh/guide/publish-your-project.html +0 -92
- package/docs/.island/dist/zh/guide/test-your-project.html +0 -72
- package/docs/.island/dist/zh/guide/use-micro-generator.html +0 -65
- package/docs/.island/dist/zh/guide/using-storybook.html +0 -114
- package/docs/.island/dist/zh/guide/welcome.html +0 -53
- package/docs/.island/dist/zh/guide/why-module-engineering-solution.html +0 -49
- package/docs/.island/dist/zh/index.html +0 -42
- package/docs/.island/index.html +0 -39
- package/docs/en/api/design-system.md +0 -524
- package/docs/en/api/dev.md +0 -32
- package/docs/en/api/plugin.md +0 -34
- package/docs/zh/api/build-config.md +0 -570
- package/docs/zh/api/dev.md +0 -33
- package/docs/zh/api/plugins.md +0 -108
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 3
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# 快速开始
|
|
2
6
|
|
|
3
7
|
## 三分钟快速上手
|
|
@@ -21,15 +25,16 @@ npm install -D @modern-js/module-tools @modern-js/plugin-testing
|
|
|
21
25
|
|
|
22
26
|
```json
|
|
23
27
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "modern build"
|
|
30
|
+
}
|
|
27
31
|
}
|
|
28
32
|
```
|
|
29
33
|
|
|
30
34
|
如果你的项目存在 `src/index.(js|jsx)` 文件或者同时存在 `src/index.(ts|tsx)` 和 `tsconfig.json` 文件,那么恭喜你可以运行直接运行 `npm run build` 来使用 Module Tools 构建你的项目了。
|
|
31
35
|
|
|
32
36
|
**如果你想要看看使用了模块工程方案的真实项目,可以执行以下命令**:
|
|
37
|
+
|
|
33
38
|
```bash
|
|
34
39
|
git clone https://github.com/modern-js-dev/module-tools-examples
|
|
35
40
|
cd module-tools-example
|
|
@@ -46,8 +51,8 @@ pnpm dev storybook
|
|
|
46
51
|
## 测试
|
|
47
52
|
pnpm test
|
|
48
53
|
```
|
|
49
|
-
> 上面的链接对应的内容待补充
|
|
50
54
|
|
|
55
|
+
> 上面的链接对应的内容待补充
|
|
51
56
|
|
|
52
57
|
**如果你想要创建一个完整的模块工程项目,可以执行以下命令:**
|
|
53
58
|
|
|
@@ -63,6 +68,7 @@ npx @modern-js/create your-project-dir-name
|
|
|
63
68
|
? 请选择开发语言 TS
|
|
64
69
|
? 请选择包管理工具 pnpm
|
|
65
70
|
```
|
|
71
|
+
|
|
66
72
|
> 项目名称为 `package.json` 中的 `"name"` 字段值。
|
|
67
73
|
|
|
68
74
|
接着就会开始初始化项目的流程。在项目目录和文件生成以及依赖安装完毕后,此时就创建了一个完整的模块工程项目。
|
|
@@ -73,6 +79,6 @@ npx @modern-js/create your-project-dir-name
|
|
|
73
79
|
|
|
74
80
|
选择适合你的教程:
|
|
75
81
|
|
|
76
|
-
- 我是初学者,需要学习 Module Tools 的[基础使用](/
|
|
77
|
-
- 我已经初步掌握了 Module Tools 的使用,可以学习 Module Tools 的[高级使用](/
|
|
82
|
+
- 我是初学者,需要学习 Module Tools 的[基础使用](/guide/basic/before-getting-started)。
|
|
83
|
+
- 我已经初步掌握了 Module Tools 的使用,可以学习 Module Tools 的[高级使用](/guide/basic/before-getting-started)。
|
|
78
84
|
- 我是项目的维护者,需要学习如何开发 Module Tools 的插件以及了解更多关于 Module Tools 进阶的内容。
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 2
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# 为什么需要模块工程解决方案
|
|
2
6
|
|
|
3
7
|
大家可能都经历过:从零开始开发一个组件库或者工具库的过程中,我们不仅要考虑项目本身的代码逻辑如何编写,还要考虑项目的构建、调试、测试、代码格式化等等和代码逻辑无关的事情。
|
|
@@ -12,6 +16,6 @@
|
|
|
12
16
|
|
|
13
17
|
如果说每次开发一个模块类型的项目都需要经历一遍这些工作准备的话,那么基本上刚开始开发的时间会大部分花费在这些与代码实现无关的事情上。如果能够提供一个模块工程解决方案,它能够帮助开发者解决项目工程上的事情,让开发者可以更专注于代码的实现上,那么这将会大大提升模块类型项目的开发体验。
|
|
14
18
|
|
|
15
|
-

|
|
19
|
+

|
|
16
20
|
|
|
17
21
|
Modern.js 为了让开发模块类型的项目更简单,为了解决上述提到的问题提供了模块工程解决方案,并且使用 Module Tools 提供了主要的功能。**Module-tools 可以理解为是一个专门用于模块类型项目开发的工具**。
|
package/docs/zh/index.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
pageType: home
|
|
3
3
|
|
|
4
4
|
hero:
|
|
5
|
-
name: Module
|
|
5
|
+
name: Module Tools
|
|
6
6
|
text: 模块工程解决方案
|
|
7
7
|
tagline: 简单、强大、高性能的现代化npm包开发方案
|
|
8
8
|
actions:
|
|
9
9
|
- theme: brand
|
|
10
10
|
text: 欢迎使用
|
|
11
|
-
link: /
|
|
11
|
+
link: /guide/intro/welcome
|
|
12
12
|
|
|
13
13
|
features:
|
|
14
14
|
- title: 'Esbuild: 高性能的JS Bundler'
|
|
@@ -27,3 +27,4 @@ features:
|
|
|
27
27
|
details: 通过其插件扩展机制,你可以轻松的扩展Module tools的各项能力。
|
|
28
28
|
icon: 🎨
|
|
29
29
|
---
|
|
30
|
+
# index
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 快速开始
|
|
6
|
+
|
|
7
|
+
模块工程解决方案不仅提供了丰富的功能,同时也支持通过插件的方式为当前项目扩展能力。
|
|
8
|
+
|
|
9
|
+
我们可以通过下面的例子来快速了解如果编写一个 module-tools 插件:
|
|
10
|
+
|
|
11
|
+
<CH.Spotlight>
|
|
12
|
+
|
|
13
|
+
```md ./project
|
|
14
|
+
./
|
|
15
|
+
├── plugins
|
|
16
|
+
│ └── example.ts
|
|
17
|
+
├── src/
|
|
18
|
+
└── modern.config.ts
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
首先我们在初始化的项目下创建 `./plugins/example.ts` 文件。
|
|
24
|
+
|
|
25
|
+
```md ./project
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
接着在 `example.ts` 文件中增加插件的代码。
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
|
|
35
|
+
|
|
36
|
+
export const ExamplePlugin = (): CliPlugin<ModuleTools> => {
|
|
37
|
+
return {
|
|
38
|
+
name: 'example',
|
|
39
|
+
setup() {
|
|
40
|
+
console.info('this is example plugin');
|
|
41
|
+
return {
|
|
42
|
+
// use hooks
|
|
43
|
+
afterBuild() {
|
|
44
|
+
console.info('build over');
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
然后我们通过 [`plugins`](/api/config/plugins) API,将刚刚写好的插件进行注册。
|
|
55
|
+
|
|
56
|
+
```ts ./modern.config.ts
|
|
57
|
+
import { ExamplePlugin } from './plugins/example';
|
|
58
|
+
export default defineConfig({
|
|
59
|
+
plugins: [ExamplePlugin()],
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
最后运行 `modern build`,就可以看到。
|
|
66
|
+
|
|
67
|
+
```bash terminal
|
|
68
|
+
this is example plugin
|
|
69
|
+
Build succeed: 510.684ms
|
|
70
|
+
build over
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
</CH.Spotlight>
|
|
74
|
+
|
|
75
|
+
通过上面这个例子,我们了解到了下面几件事:
|
|
76
|
+
|
|
77
|
+
- 推荐的插件目录结构
|
|
78
|
+
- 插件的初始化代码
|
|
79
|
+
- 插件的注册
|
|
80
|
+
|
|
81
|
+
除了以上内容以外,我们还需要了解:
|
|
82
|
+
|
|
83
|
+
- [插件对象、类型定义与推荐配置项](/plugins/guide/plugin-object)
|
|
84
|
+
- [setup 函数、`api` 对象参数、生命周期钩子](/plugins/guide/setup-function)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 2
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 插件对象
|
|
6
|
+
|
|
7
|
+
Module-tools 插件是一个对象,对象包含以下属性:
|
|
8
|
+
|
|
9
|
+
- `name`:插件的名称,唯一标识符。
|
|
10
|
+
- `setup`:插件初始化函数,只会执行一次。setup 函数可以返回一个 [Hooks 对象](),module-tools 会在特定的时机执行 Hooks 对象上定义的 Hook 对应的函数。
|
|
11
|
+
|
|
12
|
+
例如在下面的插件代码示例中,在项目开始执行构建任务之前会触发 `beforeBuild` 函数的执行,并打印 `build start` 的 log 内容。
|
|
13
|
+
|
|
14
|
+
<CH.Code>
|
|
15
|
+
|
|
16
|
+
```ts ./plugins/demo.tsx
|
|
17
|
+
import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
|
|
18
|
+
|
|
19
|
+
const MyPlugin: CliPlugin<ModuleTools> = {
|
|
20
|
+
name: 'my-plugin',
|
|
21
|
+
|
|
22
|
+
setup() {
|
|
23
|
+
return {
|
|
24
|
+
// this is hook
|
|
25
|
+
beforeBuild: () => {
|
|
26
|
+
console.info('build start');
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
```ts ./modern.config.ts
|
|
36
|
+
import { MyPlugin } from './plugins/demo';
|
|
37
|
+
export default {
|
|
38
|
+
plugins: [MyPlugin()],
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
</CH.Code>
|
|
43
|
+
|
|
44
|
+
## 插件类型定义
|
|
45
|
+
|
|
46
|
+
使用 TypeScript 时,可以引入内置的 `CliPlugin` 和 `ModuleTools` 类型,为插件提供正确的类型推导:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
|
|
50
|
+
|
|
51
|
+
const MyPlugin: CliPlugin<ModuleTools> = {
|
|
52
|
+
name: 'my-plugin',
|
|
53
|
+
|
|
54
|
+
setup() {
|
|
55
|
+
const foo = '1';
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
// this is hook
|
|
59
|
+
afterBuild: () => {
|
|
60
|
+
//...
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 插件配置项
|
|
68
|
+
|
|
69
|
+
**建议将插件写成函数的形式**,使插件能通过函数入参来接收配置项:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
|
|
73
|
+
|
|
74
|
+
type MyPluginOptions = {
|
|
75
|
+
foo: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const MyPlugin = (options: MyPluginOptions): CliPlugin<ModuleTools> => ({
|
|
79
|
+
name: 'my-plugin',
|
|
80
|
+
|
|
81
|
+
setup() {
|
|
82
|
+
console.log(options.foo);
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 3
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Setup 函数
|
|
6
|
+
|
|
7
|
+
在[【插件对象】](/plugins/guide/plugin-object) 部分我们知道插件对象包含了一个 `setup` 函数,该函数不仅包含了一个 `api` 对象参数,同时还可以返回一个 Hooks 对象。
|
|
8
|
+
|
|
9
|
+
## 插件 API 对象
|
|
10
|
+
|
|
11
|
+
插件的 `setup` 函数会提供一个 `api` 对象参数,你可以调用该对象上提供的一些方法来获取到配置、项目上下文等信息。
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
export default (): CliPlugin<ModuleTools> => ({
|
|
15
|
+
name: 'my-plugin',
|
|
16
|
+
|
|
17
|
+
setup(api) {
|
|
18
|
+
// 获取应用原始配置
|
|
19
|
+
const config = api.useConfigContext();
|
|
20
|
+
// 获取应用运行上下文
|
|
21
|
+
const appContext = api.useAppContext();
|
|
22
|
+
// 获取解析之后的最终配置
|
|
23
|
+
const resolvedConfig = api.useResolvedConfigContext();
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### `api.useAppContext`
|
|
29
|
+
|
|
30
|
+
用于获取项目上下文信息。
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
const useAppContext: () => IAppContext;
|
|
34
|
+
|
|
35
|
+
interface IAppContext {
|
|
36
|
+
appDirectory: string;
|
|
37
|
+
configFile: string | false;
|
|
38
|
+
packageName: string;
|
|
39
|
+
nodeModulesDirectory: string;
|
|
40
|
+
internalDirectory: string;
|
|
41
|
+
plugins: {
|
|
42
|
+
cli?: any;
|
|
43
|
+
server?: any;
|
|
44
|
+
}[];
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
:::info
|
|
49
|
+
通过实际的类型文件我们可以看到还存在着其他的字段,不过目前对于模块工程有意义的字段只有以上内容。api 对象其他的方法也是如此。
|
|
50
|
+
:::
|
|
51
|
+
|
|
52
|
+
### `api.useResolvedConfigContext`
|
|
53
|
+
|
|
54
|
+
用于获取解析之后的最终配置。
|
|
55
|
+
|
|
56
|
+
:::info
|
|
57
|
+
如果需要获取构建相关的最终配置,需要使用 [`beforeBuild`]() Hook。
|
|
58
|
+
:::
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
const useResolvedConfigContext: () => NormalizedConfig;
|
|
62
|
+
|
|
63
|
+
interface NormalizedConfig {
|
|
64
|
+
buildConfig: PartialBuildConfig;
|
|
65
|
+
buildPreset: BuildPreset;
|
|
66
|
+
designSystem?: Record<string, any>;
|
|
67
|
+
dev: Dev;
|
|
68
|
+
plugins: PluginConfig;
|
|
69
|
+
runtime: RuntimeConfig;
|
|
70
|
+
runtimeByEntries?: RuntimeByEntriesConfig;
|
|
71
|
+
_raw: UserConfig;
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### `api.useHookRunners`
|
|
76
|
+
|
|
77
|
+
用于获取 Hooks 的执行器,并触发特定的 Hook 执行。
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
import type { CliPlugin } from '@modern-js/core';
|
|
81
|
+
|
|
82
|
+
export default (): CliPlugin => ({
|
|
83
|
+
name: 'my-plugin',
|
|
84
|
+
|
|
85
|
+
async setup(api) {
|
|
86
|
+
const hookRunners = api.useHookRunners();
|
|
87
|
+
// 触发 afterBuild Hook
|
|
88
|
+
await hookRunners.afterBuild();
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 异步 setup
|
|
94
|
+
|
|
95
|
+
CLI 插件的 setup 可以是一个异步函数,在初始化过程中执行异步逻辑。
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
export default (): CliPlugin<ModuleTools> => ({
|
|
99
|
+
name: 'my-plugin',
|
|
100
|
+
|
|
101
|
+
async setup(api) {
|
|
102
|
+
await doSomething();
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 生命周期钩子
|
|
108
|
+
|
|
109
|
+
我们知道 `setup` 函数会返回一个 Hooks 对象,所谓 Hooks 对象也可以理解是具有 module-tools 生命周期钩子的对象。
|
|
110
|
+
|
|
111
|
+
目前主要包含两类钩子:
|
|
112
|
+
|
|
113
|
+
- 构建钩子:仅在执行 `build` 命令构建源码产物时触发。
|
|
114
|
+
- `buildPlatform` 钩子:仅在执行 `build --platform` 命令生成其他构建产物时触发。
|
|
115
|
+
- 调试钩子:运行 `dev` 命令时会触发的钩子。
|
|
116
|
+
|
|
117
|
+
关于生命周期钩子的完整列表参考 [API 文档](/api/plugin-api/plugin-hooks)。
|
package/modern.config.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { defineConfig } from '@modern-js/doc-tools';
|
|
3
|
+
import { remarkCodeHike } from '@code-hike/mdx';
|
|
4
|
+
import { pluginAutoSidebar } from '@modern-js/doc-plugin-auto-sidebar';
|
|
5
|
+
|
|
6
|
+
const theme = require('shiki/themes/nord.json');
|
|
7
|
+
const { version } = require('./package.json');
|
|
8
|
+
|
|
9
|
+
const isDevCommand = process.env.NODE_ENV !== 'production';
|
|
10
|
+
|
|
11
|
+
function getI18nHelper(lang: 'zh' | 'en') {
|
|
12
|
+
const cn = lang === 'zh';
|
|
13
|
+
const prefix = cn ? '' : '/en';
|
|
14
|
+
const getLink = (str: string) => `${prefix}${str}`;
|
|
15
|
+
const getText = (cnText: string, enText: string) => (cn ? cnText : enText);
|
|
16
|
+
return { getText, getLink };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getNavbar(lang: 'zh' | 'en') {
|
|
20
|
+
const { getLink, getText } = getI18nHelper(lang);
|
|
21
|
+
|
|
22
|
+
return [
|
|
23
|
+
{
|
|
24
|
+
text: getText('指南', 'Guide'),
|
|
25
|
+
link: getLink('/guide/intro/welcome'),
|
|
26
|
+
activeMatch: '^/guide/',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
text: getText('API', 'API'),
|
|
30
|
+
link: getLink('/api/'),
|
|
31
|
+
activeMatch: '^/api/',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
text: getText('插件', 'Plugins'),
|
|
35
|
+
link: getLink('/plugins/guide/getting-started'),
|
|
36
|
+
activeMatch: '^/plugins/',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
text: `v${version}`,
|
|
40
|
+
items: [
|
|
41
|
+
{
|
|
42
|
+
text: getText('更新日志', 'Changelog'),
|
|
43
|
+
link: 'https://github.com/modern-js-dev/modern.js/tree/main/packages/solutions/module-tools/CHANGELOG.md',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
text: getText('贡献指南', 'Contributing'),
|
|
47
|
+
link: 'https://github.com/modern-js-dev/modern.js/tree/main/packages/solutions/module-tools/CHANGELOG.md',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default defineConfig({
|
|
55
|
+
plugins: ['@modern-js/doc-tools'],
|
|
56
|
+
doc: {
|
|
57
|
+
root: path.join(__dirname, 'docs'),
|
|
58
|
+
lang: 'zh',
|
|
59
|
+
base: isDevCommand ? '' : '/module-tools/',
|
|
60
|
+
title: 'Module Tools',
|
|
61
|
+
// The plugins for doc tools.
|
|
62
|
+
plugins: [
|
|
63
|
+
pluginAutoSidebar({
|
|
64
|
+
root: path.join(__dirname, 'docs'),
|
|
65
|
+
categories: ['zh', 'en']
|
|
66
|
+
.map(lang =>
|
|
67
|
+
['guide', 'api', 'plugins'].map(category => `${lang}/${category}`),
|
|
68
|
+
)
|
|
69
|
+
.flat(),
|
|
70
|
+
collapsed: false,
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
73
|
+
markdown: {
|
|
74
|
+
checkDeadLinks: true,
|
|
75
|
+
remarkPlugins: [
|
|
76
|
+
[
|
|
77
|
+
remarkCodeHike,
|
|
78
|
+
{
|
|
79
|
+
theme,
|
|
80
|
+
autoImport: true,
|
|
81
|
+
showCopyButton: true,
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
themeConfig: {
|
|
87
|
+
footer: {
|
|
88
|
+
message: 'Copyright © 2022 ByteDance.',
|
|
89
|
+
},
|
|
90
|
+
socialLinks: [
|
|
91
|
+
{
|
|
92
|
+
icon: 'github',
|
|
93
|
+
mode: 'link',
|
|
94
|
+
content:
|
|
95
|
+
'https://github.com/modern-js-dev/modern.js/tree/main/packages/solutions/module-tools',
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
locales: [
|
|
99
|
+
{
|
|
100
|
+
lang: 'zh',
|
|
101
|
+
label: '简体中文',
|
|
102
|
+
nav: getNavbar('zh'),
|
|
103
|
+
title: 'Module Tools',
|
|
104
|
+
outlineTitle: '目录',
|
|
105
|
+
prevPageText: '上一页',
|
|
106
|
+
nextPageText: '下一页',
|
|
107
|
+
description: '模块工程解决方案',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
lang: 'en',
|
|
111
|
+
label: 'English',
|
|
112
|
+
nav: getNavbar('en'),
|
|
113
|
+
title: 'Module Tools',
|
|
114
|
+
description: 'Module Engineering Solutions',
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
});
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/module-tools-docs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "docs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [],
|
|
7
7
|
"author": "",
|
|
8
8
|
"license": "ISC",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"islandjs": "0.7.19",
|
|
11
10
|
"@code-hike/mdx": "^0.7.4",
|
|
12
|
-
"
|
|
11
|
+
"react": "^18.2.0",
|
|
12
|
+
"react-dom": "^18.2.0",
|
|
13
|
+
"shiki": "^0.11.1",
|
|
14
|
+
"@modern-js/doc-plugin-auto-sidebar": "2.0.2",
|
|
15
|
+
"@modern-js/doc-tools": "2.0.2"
|
|
13
16
|
},
|
|
14
17
|
"scripts": {
|
|
15
|
-
"dev": "
|
|
16
|
-
"build": "
|
|
17
|
-
"preview": "island start docs"
|
|
18
|
+
"dev": "modern dev",
|
|
19
|
+
"build": "modern build"
|
|
18
20
|
}
|
|
19
21
|
}
|
package/theme/index.ts
ADDED