@modern-js/module-tools-docs 2.0.2 → 2.2.0-beta.0
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/doc_build/html/main/index.html +1 -1
- package/doc_build/static/css/main.css +267 -660
- package/doc_build/static/css/main.css.map +1 -1
- 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 +6 -23
- 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 -1
- package/doc_build/static/js/async/en_api_config_build-config.js +79 -36
- package/doc_build/static/js/async/en_api_config_build-config.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_build-preset.js +40 -20
- package/doc_build/static/js/async/en_api_config_build-preset.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_design-system.js +33800 -2340
- package/doc_build/static/js/async/en_api_config_design-system.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_plugins.js +15 -19
- package/doc_build/static/js/async/en_api_config_testing.js +26 -24
- package/doc_build/static/js/async/en_api_config_testing.js.map +1 -1
- package/doc_build/static/js/async/{en_api_.js → en_api_index.js} +10 -14
- package/doc_build/static/js/async/en_api_index.js.map +1 -0
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js +24 -26
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_asset.js +16 -41
- package/doc_build/static/js/async/en_guide_advance_asset.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_build-umd.js +20 -24
- package/doc_build/static/js/async/en_guide_advance_copy.js +25 -23
- package/doc_build/static/js/async/en_guide_advance_copy.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_external-dependency.js +15 -19
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js +352 -94
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js +11 -15
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_theme-config.js +26 -24
- package/doc_build/static/js/async/en_guide_advance_theme-config.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.js +275 -88
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_command-preview.js +45 -33
- package/doc_build/static/js/async/en_guide_basic_command-preview.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.js +274 -196
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.js +18 -20
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_test-your-project.js +27 -32
- package/doc_build/static/js/async/en_guide_basic_test-your-project.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js +33 -15
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_using-storybook.js +24 -63
- package/doc_build/static/js/async/en_guide_basic_using-storybook.js.map +1 -1
- package/doc_build/static/js/async/en_guide_best-practices_components.js +39 -27
- package/doc_build/static/js/async/en_guide_best-practices_components.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_getting-started.js +288 -45
- package/doc_build/static/js/async/en_guide_intro_getting-started.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_welcome.js +27 -13
- package/doc_build/static/js/async/en_guide_intro_welcome.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js +16 -12
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js.map +1 -1
- package/doc_build/static/js/async/{en_.js → en_index.js} +12 -16
- package/doc_build/static/js/async/en_index.js.map +1 -0
- package/doc_build/static/js/async/en_plugins_guide_getting-started.js +17 -21
- package/doc_build/static/js/async/en_plugins_guide_plugin-object.js +20 -24
- package/doc_build/static/js/async/en_plugins_guide_setup-function.js +19 -23
- package/doc_build/static/js/async/en_plugins_guide_setup-function.js.map +1 -1
- package/doc_build/static/js/async/en_plugins_official-list_overview.js +8 -12
- package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js +166 -367
- package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js.map +1 -1
- package/doc_build/static/js/async/{api_config_build-config.js → zh_api_config_build-config.js} +80 -35
- package/doc_build/static/js/async/{api_config_build-config.js.map → zh_api_config_build-config.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_build-preset.js → zh_api_config_build-preset.js} +39 -21
- package/doc_build/static/js/async/{api_config_build-preset.js.map → zh_api_config_build-preset.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_design-system.js → zh_api_config_design-system.js} +27 -23
- package/doc_build/static/js/async/{api_config_design-system.js.map → zh_api_config_design-system.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_plugins.js → zh_api_config_plugins.js} +17 -21
- package/doc_build/static/js/async/{api_config_plugins.js.map → zh_api_config_plugins.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_testing.js → zh_api_config_testing.js} +28 -26
- package/doc_build/static/js/async/{api_config_testing.js.map → zh_api_config_testing.js.map} +1 -1
- package/doc_build/static/js/async/{api_.js → zh_api_index.js} +10 -14
- package/doc_build/static/js/async/zh_api_index.js.map +1 -0
- package/doc_build/static/js/async/{api_plugin-api_plugin-hooks.js → zh_api_plugin-api_plugin-hooks.js} +25 -27
- package/doc_build/static/js/async/{api_plugin-api_plugin-hooks.js.map → zh_api_plugin-api_plugin-hooks.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_asset.js → zh_guide_advance_asset.js} +18 -43
- package/doc_build/static/js/async/{guide_advance_asset.js.map → zh_guide_advance_asset.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_build-umd.js → zh_guide_advance_build-umd.js} +22 -26
- package/doc_build/static/js/async/{guide_advance_build-umd.js.map → zh_guide_advance_build-umd.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_copy.js → zh_guide_advance_copy.js} +26 -24
- package/doc_build/static/js/async/{guide_advance_copy.js.map → zh_guide_advance_copy.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_external-dependency.js → zh_guide_advance_external-dependency.js} +17 -21
- package/doc_build/static/js/async/{guide_advance_external-dependency.js.map → zh_guide_advance_external-dependency.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_in-depth-about-build.js → zh_guide_advance_in-depth-about-build.js} +353 -95
- package/doc_build/static/js/async/{guide_advance_in-depth-about-build.js.map → zh_guide_advance_in-depth-about-build.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_in-depth-about-dev-command.js → zh_guide_advance_in-depth-about-dev-command.js} +16 -18
- package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.js.map +1 -0
- package/doc_build/static/js/async/{guide_advance_theme-config.js → zh_guide_advance_theme-config.js} +24 -22
- package/doc_build/static/js/async/{guide_advance_theme-config.js.map → zh_guide_advance_theme-config.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_before-getting-started.js → zh_guide_basic_before-getting-started.js} +272 -85
- package/doc_build/static/js/async/zh_guide_basic_before-getting-started.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_command-preview.js → zh_guide_basic_command-preview.js} +47 -35
- package/doc_build/static/js/async/zh_guide_basic_command-preview.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_modify-output-product.js → zh_guide_basic_modify-output-product.js} +203 -88
- package/doc_build/static/js/async/zh_guide_basic_modify-output-product.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_publish-your-project.js → zh_guide_basic_publish-your-project.js} +20 -22
- package/doc_build/static/js/async/{guide_basic_publish-your-project.js.map → zh_guide_basic_publish-your-project.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_test-your-project.js → zh_guide_basic_test-your-project.js} +30 -35
- package/doc_build/static/js/async/{guide_basic_test-your-project.js.map → zh_guide_basic_test-your-project.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_use-micro-generator.js → zh_guide_basic_use-micro-generator.js} +40 -20
- package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_using-storybook.js → zh_guide_basic_using-storybook.js} +78 -171
- package/doc_build/static/js/async/{guide_basic_using-storybook.js.map → zh_guide_basic_using-storybook.js.map} +1 -1
- package/doc_build/static/js/async/{guide_best-practices_components.js → zh_guide_best-practices_components.js} +41 -29
- package/doc_build/static/js/async/{guide_best-practices_components.js.map → zh_guide_best-practices_components.js.map} +1 -1
- package/doc_build/static/js/async/{guide_intro_getting-started.js → zh_guide_intro_getting-started.js} +291 -42
- package/doc_build/static/js/async/{guide_intro_getting-started.js.map → zh_guide_intro_getting-started.js.map} +1 -1
- package/doc_build/static/js/async/{guide_intro_welcome.js → zh_guide_intro_welcome.js} +28 -14
- package/doc_build/static/js/async/zh_guide_intro_welcome.js.map +1 -0
- package/doc_build/static/js/async/{guide_intro_why-module-engineering-solution.js → zh_guide_intro_why-module-engineering-solution.js} +18 -14
- package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.js.map +1 -0
- package/doc_build/static/js/async/{index.js → zh_index.js} +11 -15
- package/doc_build/static/js/async/zh_index.js.map +1 -0
- package/doc_build/static/js/async/{plugins_guide_getting-started.js → zh_plugins_guide_getting-started.js} +19 -23
- package/doc_build/static/js/async/{plugins_guide_getting-started.js.map → zh_plugins_guide_getting-started.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_guide_plugin-object.js → zh_plugins_guide_plugin-object.js} +22 -26
- package/doc_build/static/js/async/{plugins_guide_plugin-object.js.map → zh_plugins_guide_plugin-object.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_guide_setup-function.js → zh_plugins_guide_setup-function.js} +21 -25
- package/doc_build/static/js/async/{plugins_guide_setup-function.js.map → zh_plugins_guide_setup-function.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_official-list_overview.js → zh_plugins_official-list_overview.js} +10 -14
- package/doc_build/static/js/async/zh_plugins_official-list_overview.js.map +1 -0
- package/doc_build/static/js/builder-runtime.js +1 -1
- package/doc_build/static/js/builder-runtime.js.map +1 -1
- package/doc_build/static/js/lib-polyfill.js +3433 -16355
- package/doc_build/static/js/lib-polyfill.js.map +1 -1
- package/doc_build/static/js/main.js +2073 -2700
- package/doc_build/static/js/main.js.map +1 -1
- 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 +485 -1689
- 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 -1
- package/doc_build/static/search_index.json +1 -0
- package/docs/.island/dist/404.html +41 -0
- package/docs/.island/dist/assets/asset.26aea654.js +160 -0
- package/docs/.island/dist/assets/asset.36e3d3c9.js +160 -0
- package/docs/.island/dist/assets/before-getting-started.0e863740.js +87 -0
- package/docs/.island/dist/assets/before-getting-started.2c6e6b8a.js +87 -0
- package/docs/.island/dist/assets/build-config.460d11d9.js +804 -0
- package/docs/.island/dist/assets/build-config.e155e534.js +854 -0
- package/docs/.island/dist/assets/build-preset.6c2c6c62.js +256 -0
- package/docs/.island/dist/assets/build-preset.d3da921d.js +256 -0
- package/docs/.island/dist/assets/build-umd.ba00f028.js +264 -0
- package/docs/.island/dist/assets/build-umd.edb9d163.js +273 -0
- package/docs/.island/dist/assets/command-preview.1dc93921.js +264 -0
- package/docs/.island/dist/assets/command-preview.ef7a9d01.js +264 -0
- package/docs/.island/dist/assets/components.esm.03560353.js +9 -0
- package/docs/.island/dist/assets/copy.28dc4d5f.js +277 -0
- package/docs/.island/dist/assets/copy.f4625565.js +277 -0
- package/docs/.island/dist/assets/design-system.8993234c.js +1254 -0
- package/docs/.island/dist/assets/design-system.b0ba163f.js +639 -0
- package/docs/.island/dist/assets/dev.b373b152.js +37 -0
- package/docs/.island/dist/assets/dev.b39fd42a.js +37 -0
- package/docs/.island/dist/assets/down.f35427d3.svg +1 -0
- package/docs/.island/dist/assets/extension.4bf3526b.js +1 -0
- package/docs/.island/dist/assets/extension.d64ed0b8.js +469 -0
- package/docs/.island/dist/assets/external-dependency.2ede7532.js +156 -0
- package/docs/.island/dist/assets/external-dependency.92ca89e0.js +156 -0
- package/docs/.island/dist/assets/getting-started.822cf0b2.js +117 -0
- package/docs/.island/dist/assets/getting-started.e2764829.js +114 -0
- package/docs/.island/dist/assets/github.3bf8ccee.svg +1 -0
- package/docs/.island/dist/assets/in-depth-about-build.94cc902d.js +375 -0
- package/docs/.island/dist/assets/in-depth-about-build.aa74de10.js +374 -0
- package/docs/.island/dist/assets/in-depth-about-dev-command.877bdb83.js +33 -0
- package/docs/.island/dist/assets/in-depth-about-dev-command.9736befd.js +39 -0
- package/docs/.island/dist/assets/index.01786ba7.js +30 -0
- package/docs/.island/dist/assets/index.6cef6f5f.js +4 -0
- package/docs/.island/dist/assets/index.cb118238.js +36 -0
- package/docs/.island/dist/assets/index.ccb6ce27.js +4 -0
- package/docs/.island/dist/assets/island_inject.69495876.js +1 -0
- package/docs/.island/dist/assets/island_inject.cdfb22d9.js +1 -0
- package/docs/.island/dist/assets/loading.8c9bb911.svg +1 -0
- package/docs/.island/dist/assets/modify-output-product.9e2394d7.js +100 -0
- package/docs/.island/dist/assets/modify-output-product.f363845a.js +100 -0
- package/docs/.island/dist/assets/moon.6b705924.svg +3 -0
- package/docs/.island/dist/assets/plugin.70a61997.js +42 -0
- package/docs/.island/dist/assets/plugin.80b12ee2.js +42 -0
- package/docs/.island/dist/assets/publish-your-project.7321c10e.js +164 -0
- package/docs/.island/dist/assets/publish-your-project.7326359f.js +166 -0
- package/docs/.island/dist/assets/right.89674cd7.svg +1 -0
- package/docs/.island/dist/assets/search.0aea6901.svg +1 -0
- package/docs/.island/dist/assets/search.11353245.js +222 -0
- package/docs/.island/dist/assets/search.a1b1cff3.js +3 -0
- package/docs/.island/dist/assets/search.f9025ced.js +3 -0
- package/docs/.island/dist/assets/style.09015a4b.css +1 -0
- package/docs/.island/dist/assets/style.2e5f7bc2.css +1970 -0
- package/docs/.island/dist/assets/sun.841dac10.svg +11 -0
- package/docs/.island/dist/assets/test-your-project.8ab2809e.js +190 -0
- package/docs/.island/dist/assets/test-your-project.9ae2a49e.js +190 -0
- package/docs/.island/dist/assets/test.2bfe276b.js +66 -0
- package/docs/.island/dist/assets/test.a2c00a3f.js +67 -0
- package/docs/.island/dist/assets/translator.b1077c44.svg +1 -0
- package/docs/.island/dist/assets/use-micro-generator.13c1a09f.js +60 -0
- package/docs/.island/dist/assets/use-micro-generator.dfe877f6.js +60 -0
- package/docs/.island/dist/assets/using-storybook.adb88cb8.js +260 -0
- package/docs/.island/dist/assets/using-storybook.b8e7dd04.js +260 -0
- package/docs/.island/dist/assets/welcome.94880043.js +13 -0
- package/docs/.island/dist/assets/welcome.b2140e7e.js +13 -0
- package/docs/.island/dist/assets/why-module-engineering-solution.bfe7981a.js +26 -0
- package/docs/.island/dist/assets/why-module-engineering-solution.e31cd19f.js +26 -0
- package/docs/.island/dist/chunk-COLCRJ2V.js +1 -0
- package/docs/.island/dist/chunk-K5FMOYDC.js +10 -0
- package/docs/.island/dist/chunk-WE42KMYS.js +26 -0
- package/docs/.island/dist/client-entry.js +3 -0
- package/docs/.island/dist/en/api/build-config.html +344 -0
- package/docs/.island/dist/en/api/build-preset.html +82 -0
- package/docs/.island/dist/en/api/design-system.html +155 -0
- package/docs/.island/dist/en/api/dev.html +45 -0
- package/docs/.island/dist/en/api/index.html +41 -0
- package/docs/.island/dist/en/api/plugin.html +48 -0
- package/docs/.island/dist/en/api/test.html +58 -0
- package/docs/.island/dist/en/guide/advance/asset.html +68 -0
- package/docs/.island/dist/en/guide/advance/build-umd.html +72 -0
- package/docs/.island/dist/en/guide/advance/copy.html +82 -0
- package/docs/.island/dist/en/guide/advance/extension.html +41 -0
- package/docs/.island/dist/en/guide/advance/external-dependency.html +71 -0
- package/docs/.island/dist/en/guide/advance/in-depth-about-build.html +148 -0
- package/docs/.island/dist/en/guide/advance/in-depth-about-dev-command.html +51 -0
- package/docs/.island/dist/en/guide/basic/before-getting-started.html +127 -0
- package/docs/.island/dist/en/guide/basic/command-preview.html +100 -0
- package/docs/.island/dist/en/guide/basic/modify-output-product.html +140 -0
- package/docs/.island/dist/en/guide/basic/publish-your-project.html +91 -0
- package/docs/.island/dist/en/guide/basic/test-your-project.html +72 -0
- package/docs/.island/dist/en/guide/basic/use-micro-generator.html +65 -0
- package/docs/.island/dist/en/guide/basic/using-storybook.html +113 -0
- package/docs/.island/dist/en/guide/intro/getting-started.html +76 -0
- package/docs/.island/dist/en/guide/intro/welcome.html +53 -0
- package/docs/.island/dist/en/guide/intro/why-module-engineering-solution.html +49 -0
- package/docs/.island/dist/en/index.html +42 -0
- package/docs/.island/dist/react-dom.js +1 -0
- package/docs/.island/dist/react-dom_client.js +1 -0
- package/docs/.island/dist/react.js +1 -0
- package/docs/.island/dist/react_jsx-runtime.js +10 -0
- package/docs/.island/dist/ssr-manifest.json +57 -0
- 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 +361 -0
- package/docs/.island/dist/zh/api/build-preset.html +82 -0
- package/docs/.island/dist/zh/api/design-system.html +149 -0
- package/docs/.island/dist/zh/api/dev.html +46 -0
- package/docs/.island/dist/zh/api/index.html +41 -0
- package/docs/.island/dist/zh/api/plugin.html +48 -0
- package/docs/.island/dist/zh/api/test.html +59 -0
- package/docs/.island/dist/zh/guide/advance/asset.html +68 -0
- package/docs/.island/dist/zh/guide/advance/build-umd.html +72 -0
- package/docs/.island/dist/zh/guide/advance/copy.html +82 -0
- package/docs/.island/dist/zh/guide/advance/extension.html +127 -0
- package/docs/.island/dist/zh/guide/advance/external-dependency.html +71 -0
- package/docs/.island/dist/zh/guide/advance/in-depth-about-build.html +148 -0
- package/docs/.island/dist/zh/guide/advance/in-depth-about-dev-command.html +53 -0
- package/docs/.island/dist/zh/guide/basic/before-getting-started.html +127 -0
- package/docs/.island/dist/zh/guide/basic/command-preview.html +100 -0
- package/docs/.island/dist/zh/guide/basic/modify-output-product.html +140 -0
- package/docs/.island/dist/zh/guide/basic/publish-your-project.html +92 -0
- package/docs/.island/dist/zh/guide/basic/test-your-project.html +72 -0
- package/docs/.island/dist/zh/guide/basic/use-micro-generator.html +65 -0
- package/docs/.island/dist/zh/guide/basic/using-storybook.html +114 -0
- package/docs/.island/dist/zh/guide/intro/getting-started.html +79 -0
- package/docs/.island/dist/zh/guide/intro/welcome.html +53 -0
- package/docs/.island/dist/zh/guide/intro/why-module-engineering-solution.html +49 -0
- package/docs/.island/dist/zh/index.html +42 -0
- package/docs/en/api/config/build-config.md +15 -5
- package/docs/en/api/config/build-preset.md +3 -2
- package/docs/en/api/config/design-system.md +623 -615
- package/docs/en/api/config/plugins.md +2 -2
- package/docs/en/api/config/testing.md +2 -1
- package/docs/en/guide/advance/asset.mdx +0 -4
- package/docs/en/guide/advance/build-umd.mdx +3 -3
- package/docs/en/guide/advance/in-depth-about-build.md +14 -13
- package/docs/en/guide/advance/in-depth-about-dev-command.md +2 -1
- package/docs/en/guide/basic/before-getting-started.md +16 -9
- package/docs/en/guide/basic/command-preview.md +2 -2
- package/docs/en/guide/basic/modify-output-product.md +65 -69
- package/docs/en/guide/basic/test-your-project.mdx +1 -3
- package/docs/en/guide/basic/use-micro-generator.md +4 -0
- package/docs/en/guide/basic/using-storybook.mdx +1 -13
- package/docs/en/guide/intro/getting-started.md +16 -7
- package/docs/en/plugins/guide/getting-started.mdx +2 -2
- package/docs/en/plugins/guide/plugin-object.mdx +5 -5
- package/docs/zh/api/config/build-config.md +18 -6
- package/docs/zh/api/config/build-preset.md +3 -2
- package/docs/zh/api/config/design-system.md +2 -2
- package/docs/zh/api/config/plugins.md +2 -2
- package/docs/zh/api/config/testing.md +3 -2
- package/docs/zh/guide/advance/asset.mdx +0 -5
- package/docs/zh/guide/advance/build-umd.mdx +3 -3
- package/docs/zh/guide/advance/in-depth-about-build.md +14 -13
- package/docs/zh/guide/advance/in-depth-about-dev-command.md +2 -1
- package/docs/zh/guide/basic/before-getting-started.md +15 -8
- package/docs/zh/guide/basic/command-preview.md +2 -2
- package/docs/zh/guide/basic/modify-output-product.md +17 -19
- package/docs/zh/guide/basic/test-your-project.mdx +1 -3
- package/docs/zh/guide/basic/use-micro-generator.md +5 -1
- package/docs/zh/guide/basic/using-storybook.mdx +9 -19
- package/docs/zh/guide/intro/getting-started.md +17 -11
- package/docs/zh/plugins/guide/getting-started.mdx +2 -2
- package/docs/zh/plugins/guide/plugin-object.mdx +5 -5
- package/modern.config.ts +11 -5
- package/package.json +4 -4
- package/doc_build/static/js/async/api_.js.map +0 -1
- package/doc_build/static/js/async/en_.js.map +0 -1
- package/doc_build/static/js/async/en_api_.js.map +0 -1
- package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_before-getting-started.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_command-preview.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_modify-output-product.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_use-micro-generator.js.map +0 -1
- package/doc_build/static/js/async/guide_intro_welcome.js.map +0 -1
- package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js.map +0 -1
- package/doc_build/static/js/async/index.js.map +0 -1
- package/doc_build/static/js/async/plugins_official-list_overview.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/js/async/zh_guide_basic_modify-output-product.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;AAAA;AAAA;;AAAA;;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA","sources":["webpack://@modern-js/module-tools-docs/./docs/zh/guide/basic/modify-output-product.md"],"names":[],"sourceRoot":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["
|
|
2
|
+
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["zh_guide_basic_publish-your-project"],{
|
|
3
3
|
|
|
4
4
|
/***/ "./docs/zh/guide/basic/publish-your-project.md":
|
|
5
5
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -18,11 +18,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18
18
|
/*@jsxRuntime automatic @jsxImportSource react*/
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const CH = {
|
|
22
22
|
annotations: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.annotations,
|
|
23
23
|
Code: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Code
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
const chCodeConfig = {
|
|
26
26
|
"staticMediaQuery": "not screen, (max-width: 768px)",
|
|
27
27
|
"theme": {
|
|
28
28
|
"name": "nord",
|
|
@@ -1185,12 +1185,12 @@ var chCodeConfig = {
|
|
|
1185
1185
|
"autoImport": true,
|
|
1186
1186
|
"showCopyButton": true,
|
|
1187
1187
|
"skipLanguages": [],
|
|
1188
|
-
"filepath": "/Users/
|
|
1188
|
+
"filepath": "/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/guide/basic/publish-your-project.md"
|
|
1189
1189
|
};
|
|
1190
|
-
|
|
1190
|
+
const frontmatter = {
|
|
1191
1191
|
"sidebar_position": 7
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
const toc = [{
|
|
1194
1194
|
"id": "跟踪变更",
|
|
1195
1195
|
"text": "跟踪变更",
|
|
1196
1196
|
"depth": 2
|
|
@@ -1207,10 +1207,10 @@ var toc = [{
|
|
|
1207
1207
|
"text": "预发布",
|
|
1208
1208
|
"depth": 2
|
|
1209
1209
|
}];
|
|
1210
|
-
|
|
1211
|
-
|
|
1210
|
+
const title = `版本管理与发布`;
|
|
1211
|
+
const content = "\"---\\nsidebar_position: 7\\n---\\n\\n# 版本管理与发布\\n\\n一个 npm 类型的模块项目发布流程包含了两个阶段:\\n\\n- 第一阶段是在开发期间,开发者需要提供一个变更文件来记录需要发布的变动;\\n- 第二阶段是在发布期间,Module Tools 可以收集所有的变更文件来更新版本、更新发布日志,并发布新的包到 [npm Registry](https://www.npmjs.com/) 上。\\n\\n## 跟踪变更\\n\\n**当项目发生变化的时候需要将变化的内容记录下来**。项目发生的变化一般是指:\\n\\n- 新功能\\n- 修复问题\\n- 配置文件修改\\n- ...\\n\\n当这些变化一旦完成后,需要通过以下命令来对当前的变化进行记录:\\n\\n- [`modern change`](/guide/basic/command-preview#modern-change)\\n\\n执行 `modern change` 命令后会向开发者提出几个问题,并根据开发者的回答生成变更记录。变更记录文件包含了版本变化的类型和其描述,该文件会被提交到 git 仓库中。\\n\\n```bash\\n$ npx modern change\\n🦋 What kind of change is this for module-example? (current version is 0.1.0) · patch\\n🦋 Please enter a summary for this change (this will be in the changelogs). Submit empty line to open external editor\\n🦋 Summary · publish test\\n🦋 === Releasing the following packages ===\\n🦋 [Patch]\\n🦋 module\\n🦋 Is this your desired changeset? (Y/n) · true\\n🦋 Changeset added! - you can now commit it\\n🦋\\n🦋 If you want to modify or expand on the changeset summary, you can find it here\\n🦋 info /xxxxxx/module/.changeset/brave-dryers-agree.md\\n```\\n\\n当执行成功后,生成的包含变更记录的 Markdown 文件会保存在项目的 `.changeset` 目录下面。其内容类似下面这样:\\n\\n```markdown .changeset/brave-dryers-agree.md\\n---\\n'module-example': patch\\n---\\n\\npublish test\\n```\\n\\n## 版本更新\\n\\n当需要更新项目版本的时候,执行以下命令:\\n\\n- [`modern bump`](/guide/basic/command-preview#modern-bump)\\n\\n执行 `modern bump` 将会基于 `.changeset/` 目录下记录了变更的 Markdown 文件内容来修改 `package.json` 中的版本号,同时生成 `CHANGELOG.md` 文件。**而当版本更新完成后,这些记录变更的 Markdown 文件也会被删除,也可说这些 Markdown 文件被“消耗”掉了**。\\n\\n```markdown CHANGELOG.md\\n# module\\n\\n## 0.1.1\\n\\n### Patch Changes\\n\\n- publish test\\n```\\n\\n## 发布\\n\\n发布项目可以执行以下命令:\\n\\n- [`modern publish`](/guide/basic/command-preview#modern-release)\\n\\n`modern release` 命令可以将项目发布到 npm Registry。\\n\\n此时发布的是 `latest` 版本,也可以说是正式版本。如果想要修改 `dist-tag`,可以通过 `modern release --tag` 命令来指定。例如:\\n\\n```bash\\nmodern release --tag beta\\n```\\n\\n但是如果希望将当前项目的版本号也修改为预发布的版本号,则需要使用 `modern pre` 命令。\\n\\n> 所谓 `dist-tag`,可以理解:为当前发布的版本打标签。一般来说,默认发布的版本对应的 `dist-tag` 为 `latest`,因此可以把 `latest` 认为是正式版本的 `dist-tag`。\\n\\n## 预发布\\n\\n当需要在正式发布之前进行预发布,则需要执行以下命令:\\n\\n- [`modern pre`](/guide/basic/command-preview#modern-pre)\\n\\n首先 `modern pre enter <tag>` 进入预发布模式,`<tag>` 可以与发布项目的时候使用 `modern release --tag` 命令指定的 `tag` 一致。\\n\\n```bash\\n$ npx modern pre enter next\\n🦋 success Entered pre mode with tag next\\n🦋 info Run `changeset version` to version packages with prerelease versions\\n✨ Done in 5.30s.\\n```\\n\\n接着可以使用 `modern bump` 命令更新具体的版本号,**此时不会真正的“消耗”记录变更的 Markdown 文件**:\\n\\n```bash\\n$ npx modern bump\\n🦋 warn ===============================IMPORTANT!===============================\\n🦋 warn You are in prerelease mode\\n🦋 warn If you meant to do a normal release you should revert these changes and run `changeset pre exit`\\n🦋 warn You can then run `changeset version` again to do a normal release\\n🦋 warn ----------------------------------------------------------------------\\n🦋 All files have been updated. Review them and commit at your leisure\\n```\\n\\n然后可以看到 `package.json` 中更新的版本号会类似这样:`0.1.2-next.0`。\\n\\n最后,**如果不需要再进行预发布,则一定要执行 `modern pre exit` 命令**,这样可以退出预发布状态,并且当再次执行 `modern bump` 命令的时候,就可以发布正式的版本。\\n\"";
|
|
1212
1212
|
function _createMdxContent(props) {
|
|
1213
|
-
|
|
1213
|
+
const _components = Object.assign({
|
|
1214
1214
|
h1: "h1",
|
|
1215
1215
|
a: "a",
|
|
1216
1216
|
p: "p",
|
|
@@ -1240,6 +1240,8 @@ function _createMdxContent(props) {
|
|
|
1240
1240
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.li, {
|
|
1241
1241
|
children: ["第二阶段是在发布期间,Module Tools 可以收集所有的变更文件来更新版本、更新发布日志,并发布新的包到 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1242
1242
|
href: "https://www.npmjs.com/",
|
|
1243
|
+
target: "_blank",
|
|
1244
|
+
rel: "nofollow",
|
|
1243
1245
|
children: "npm Registry"
|
|
1244
1246
|
}), " 上。"]
|
|
1245
1247
|
}), "\n"]
|
|
@@ -1270,7 +1272,7 @@ function _createMdxContent(props) {
|
|
|
1270
1272
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
1271
1273
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1272
1274
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1273
|
-
href: "/guide/basic/command-preview#modern-change
|
|
1275
|
+
href: "/module-tools/guide/basic/command-preview.html#modern-change",
|
|
1274
1276
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1275
1277
|
children: "modern change"
|
|
1276
1278
|
})
|
|
@@ -1699,7 +1701,7 @@ function _createMdxContent(props) {
|
|
|
1699
1701
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
1700
1702
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1701
1703
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1702
|
-
href: "/guide/basic/command-preview#modern-bump
|
|
1704
|
+
href: "/module-tools/guide/basic/command-preview.html#modern-bump",
|
|
1703
1705
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1704
1706
|
children: "modern bump"
|
|
1705
1707
|
})
|
|
@@ -1816,7 +1818,7 @@ function _createMdxContent(props) {
|
|
|
1816
1818
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
1817
1819
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1818
1820
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1819
|
-
href: "/guide/basic/command-preview#modern-release
|
|
1821
|
+
href: "/module-tools/guide/basic/command-preview.html#modern-release",
|
|
1820
1822
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1821
1823
|
children: "modern publish"
|
|
1822
1824
|
})
|
|
@@ -1890,7 +1892,7 @@ function _createMdxContent(props) {
|
|
|
1890
1892
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
1891
1893
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1892
1894
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1893
|
-
href: "/guide/basic/command-preview#modern-pre
|
|
1895
|
+
href: "/module-tools/guide/basic/command-preview.html#modern-pre",
|
|
1894
1896
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1895
1897
|
children: "modern pre"
|
|
1896
1898
|
})
|
|
@@ -2221,23 +2223,19 @@ function _createMdxContent(props) {
|
|
|
2221
2223
|
})]
|
|
2222
2224
|
});
|
|
2223
2225
|
}
|
|
2224
|
-
function MDXContent() {
|
|
2225
|
-
|
|
2226
|
-
var _ref = props.components || {},
|
|
2227
|
-
MDXLayout = _ref.wrapper;
|
|
2226
|
+
function MDXContent(props = {}) {
|
|
2227
|
+
const {wrapper: MDXLayout} = props.components || ({});
|
|
2228
2228
|
return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
|
|
2229
2229
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
|
|
2230
2230
|
})) : _createMdxContent(props);
|
|
2231
2231
|
}
|
|
2232
|
-
_c = MDXContent;
|
|
2233
2232
|
/* harmony default export */ __webpack_exports__["default"] = (MDXContent);
|
|
2234
2233
|
function _missingMdxReference(id, component, place) {
|
|
2235
|
-
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/
|
|
2234
|
+
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/guide/basic/publish-your-project.md`" : ""));
|
|
2236
2235
|
}
|
|
2237
|
-
|
|
2238
|
-
__webpack_require__.$Refresh$.register(_c, "MDXContent");
|
|
2236
|
+
|
|
2239
2237
|
|
|
2240
2238
|
/***/ })
|
|
2241
2239
|
|
|
2242
2240
|
}]);
|
|
2243
|
-
//# sourceMappingURL=
|
|
2241
|
+
//# sourceMappingURL=zh_guide_basic_publish-your-project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/
|
|
1
|
+
{"version":3,"file":"static/js/async/zh_guide_basic_publish-your-project.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;AAYA;;AAAA;;AAAA;;AAEA;AAAA;;AAAA;AAAA;;AAAA","sources":["webpack://@modern-js/module-tools-docs/./docs/zh/guide/basic/publish-your-project.md"],"names":[],"sourceRoot":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["
|
|
2
|
+
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["zh_guide_basic_test-your-project"],{
|
|
3
3
|
|
|
4
4
|
/***/ "./docs/zh/guide/basic/test-your-project.mdx":
|
|
5
5
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -19,13 +19,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19
19
|
/*链接待补充*/
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const CH = {
|
|
23
23
|
annotations: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.annotations,
|
|
24
24
|
Code: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Code,
|
|
25
25
|
Spotlight: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Spotlight,
|
|
26
26
|
CodeSlot: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.CodeSlot
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
const chCodeConfig = {
|
|
29
29
|
"staticMediaQuery": "not screen, (max-width: 768px)",
|
|
30
30
|
"theme": {
|
|
31
31
|
"name": "nord",
|
|
@@ -1188,12 +1188,12 @@ var chCodeConfig = {
|
|
|
1188
1188
|
"autoImport": true,
|
|
1189
1189
|
"showCopyButton": true,
|
|
1190
1190
|
"skipLanguages": [],
|
|
1191
|
-
"filepath": "/Users/
|
|
1191
|
+
"filepath": "/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/guide/basic/test-your-project.mdx"
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
const frontmatter = {
|
|
1194
1194
|
"sidebar_position": 6
|
|
1195
1195
|
};
|
|
1196
|
-
|
|
1196
|
+
const toc = [{
|
|
1197
1197
|
"id": "先决条件和约定",
|
|
1198
1198
|
"text": "先决条件和约定",
|
|
1199
1199
|
"depth": 2
|
|
@@ -1218,26 +1218,26 @@ var toc = [{
|
|
|
1218
1218
|
"text": "组件",
|
|
1219
1219
|
"depth": 3
|
|
1220
1220
|
}];
|
|
1221
|
-
|
|
1222
|
-
|
|
1221
|
+
const title = `测试项目`;
|
|
1222
|
+
const content = "\"---\\nsidebar_position: 6\\n---\\n\\n# 测试项目\\n\\n本章将要介绍如何测试可复用模块。\\n\\n## 先决条件和约定\\n\\n想要使用项目的测试功能,需要确保项目中包含依赖:`\\\"@modern-js/plugin-testing\\\"` ,可以通过[modern new](/guide/basic/command-preview#modern-new)来完成。\\n\\n在模块工程方案中,对于测试用例或者说编写测试的文件有如下约定:\\n\\n- 项目目录下的 `tests` 目录为测试用例和测试文件的目录,**不支持更改运行测试用例的目录**。\\n- 默认会自动将后缀为 `.test.[tj]sx?` 的文件识别为测试文件。\\n- 其他的 `.[tj]sx?` 后缀的文件被识别为普通的文件,可以用于测试的 `utils` 文件或者其他用途。\\n\\n## 运行测试\\n\\n当准备好了依赖以及了解了测试用例在哪里编写后,我们可以通过以下命令来执行测试:\\n\\n```bash\\nmodern test\\n\\n// 更新 snapshot\\nmodern test --updateSnapshot\\n```\\n\\n执行之后,会看到测试的结果:\\n\\n\\n\\n## 使用配置\\n\\n/obj/eden-cn/uhbfnupenuhf/test-result.png\\n模块工程方案对测试提供了以下配置:\\n\\n- [`testing`](/api/config/testing)\\n\\n可以在 `modern.config.(j|t)s` 中增加它。\\n\\n## 测试示例\\n\\n### 普通模块\\n\\n对于普通的模块,我们可以按照如下方式使用测试功能:\\n\\n<CH.Spotlight>\\n\\n```typescript ./src/index.ts\\nexport default function () {\\n return 'hello world';\\n}\\n```\\n\\n---\\n\\n首先是模块的代码。\\n\\n```typescript ./src/index.ts\\nexport default function () {\\n return 'hello world';\\n}\\n```\\n\\n---\\n\\n然后在测试文件中,我们可以这样。\\n\\n其中 `@` 指向了源码目录,在初始化项目的 `tests/tsconfig.json` 中定义了。\\n\\n```typescript ./tests/index.test.ts\\nimport main from '@/index';\\n\\ndescribe('默认值 cases', () => {\\n test('Have returns', () => {\\n const drink = jest.fn(main);\\n drink();\\n expect(drink).toHaveReturned();\\n });\\n});\\n```\\n\\n---\\n\\n最后我们可以执行 `modern test`。\\n\\n```bash\\npnpm test\\n## or\\nyarn test\\n## or\\nnpm run test\\n```\\n\\n</CH.Spotlight>\\n\\n### 组件\\n\\n{/* 链接待补充 */}\\n\\n对于组件,Modern.js 的 Runtime API 提供了用于测试 UI 组件的功能,其功能由 `@modern-js/runtime/testing` 提供。\\n\\n:::tip\\n如果需要使用 Runtime API,那么可以通过 [微生成器](/guide/basic/command-preview) 开启。\\n:::\\n\\n<CH.Spotlight>\\n\\n```tsx ./src/index.tsx\\nexport const default () {\\n return (\\n <div>This is a UI Component</div>\\n );\\n}\\n```\\n\\n---\\n\\n首先是组件的代码。\\n\\n```tsx ./src/index.tsx\\nexport const default () {\\n return (\\n <div>This is a UI Component</div>\\n );\\n}\\n```\\n\\n---\\n\\n然后在测试文件中,我们可以这样。\\n\\n其中 `@` 指向了源码目录,在初始化项目的 `tests/tsconfig.json` 中定义了。\\n\\n```tsx ./tests/index.test.tsx\\nimport { render, screen } from '@modern-js/runtime/testing';\\n\\nimport Component from '@/index';\\n\\ndescribe('默认值 cases', () => {\\n test('Rendered', () => {\\n render(<Component />);\\n expect(screen.getByText('This is a UI Component')).toBeInTheDocument();\\n });\\n});\\n```\\n\\n---\\n\\n最后我们可以执行 `modern test`。\\n\\n```bash\\npnpm test\\n## or\\nyarn test\\n## or\\nnpm run test\\n```\\n\\n</CH.Spotlight>\\n\"";
|
|
1223
1223
|
function _createMdxContent(props) {
|
|
1224
|
-
|
|
1224
|
+
const _components = Object.assign({
|
|
1225
1225
|
h1: "h1",
|
|
1226
1226
|
a: "a",
|
|
1227
1227
|
p: "p",
|
|
1228
1228
|
h2: "h2",
|
|
1229
|
+
code: "code",
|
|
1229
1230
|
ul: "ul",
|
|
1230
1231
|
li: "li",
|
|
1231
|
-
code: "code",
|
|
1232
1232
|
strong: "strong",
|
|
1233
1233
|
img: "img",
|
|
1234
1234
|
h3: "h3",
|
|
1235
1235
|
div: "div"
|
|
1236
1236
|
}, props.components);
|
|
1237
|
-
if (!CH) _missingMdxReference("CH", false, "
|
|
1238
|
-
if (!CH.Code) _missingMdxReference("CH.Code", true, "
|
|
1237
|
+
if (!CH) _missingMdxReference("CH", false, "23:1-28:4");
|
|
1238
|
+
if (!CH.Code) _missingMdxReference("CH.Code", true, "23:1-28:4");
|
|
1239
1239
|
if (!CH.CodeSlot) _missingMdxReference("CH.CodeSlot", true);
|
|
1240
|
-
if (!CH.Spotlight) _missingMdxReference("CH.Spotlight", true, "
|
|
1240
|
+
if (!CH.Spotlight) _missingMdxReference("CH.Spotlight", true, "49:1-97:16");
|
|
1241
1241
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
1242
1242
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h1, {
|
|
1243
1243
|
id: "测试项目",
|
|
@@ -1257,14 +1257,13 @@ function _createMdxContent(props) {
|
|
|
1257
1257
|
href: "#先决条件和约定",
|
|
1258
1258
|
children: "#"
|
|
1259
1259
|
}), "先决条件和约定"]
|
|
1260
|
-
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
1261
|
-
children: "
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
}), "\n"]
|
|
1260
|
+
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
1261
|
+
children: ["想要使用项目的测试功能,需要确保项目中包含依赖:", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1262
|
+
children: "\"@modern-js/plugin-testing\""
|
|
1263
|
+
}), " ,可以通过", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1264
|
+
href: "/module-tools/guide/basic/command-preview.html#modern-new",
|
|
1265
|
+
children: "modern new"
|
|
1266
|
+
}), "来完成。"]
|
|
1268
1267
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
|
|
1269
1268
|
children: "在模块工程方案中,对于测试用例或者说编写测试的文件有如下约定:"
|
|
1270
1269
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
@@ -1381,7 +1380,7 @@ function _createMdxContent(props) {
|
|
|
1381
1380
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
1382
1381
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1383
1382
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1384
|
-
href: "/api/config/testing.html",
|
|
1383
|
+
href: "/module-tools/api/config/testing.html",
|
|
1385
1384
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1386
1385
|
children: "testing"
|
|
1387
1386
|
})
|
|
@@ -2599,12 +2598,12 @@ function _createMdxContent(props) {
|
|
|
2599
2598
|
className: "modern-directive-title",
|
|
2600
2599
|
children: "TIP"
|
|
2601
2600
|
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.div, {
|
|
2602
|
-
className: "
|
|
2601
|
+
className: "modern-directive-content",
|
|
2603
2602
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
2604
|
-
children: ["如果需要使用 Runtime API,那么可以通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2605
|
-
href: "/guide/basic/command-preview.html",
|
|
2603
|
+
children: ["\n如果需要使用 Runtime API,那么可以通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2604
|
+
href: "/module-tools/guide/basic/command-preview.html",
|
|
2606
2605
|
children: "微生成器"
|
|
2607
|
-
}), "
|
|
2606
|
+
}), "开启。"]
|
|
2608
2607
|
})
|
|
2609
2608
|
})]
|
|
2610
2609
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(CH.Spotlight, {
|
|
@@ -3870,23 +3869,19 @@ function _createMdxContent(props) {
|
|
|
3870
3869
|
})]
|
|
3871
3870
|
});
|
|
3872
3871
|
}
|
|
3873
|
-
function MDXContent() {
|
|
3874
|
-
|
|
3875
|
-
var _ref = props.components || {},
|
|
3876
|
-
MDXLayout = _ref.wrapper;
|
|
3872
|
+
function MDXContent(props = {}) {
|
|
3873
|
+
const {wrapper: MDXLayout} = props.components || ({});
|
|
3877
3874
|
return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
|
|
3878
3875
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
|
|
3879
3876
|
})) : _createMdxContent(props);
|
|
3880
3877
|
}
|
|
3881
|
-
_c = MDXContent;
|
|
3882
3878
|
/* harmony default export */ __webpack_exports__["default"] = (MDXContent);
|
|
3883
3879
|
function _missingMdxReference(id, component, place) {
|
|
3884
|
-
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/
|
|
3880
|
+
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/guide/basic/test-your-project.mdx`" : ""));
|
|
3885
3881
|
}
|
|
3886
|
-
|
|
3887
|
-
__webpack_require__.$Refresh$.register(_c, "MDXContent");
|
|
3882
|
+
|
|
3888
3883
|
|
|
3889
3884
|
/***/ })
|
|
3890
3885
|
|
|
3891
3886
|
}]);
|
|
3892
|
-
//# sourceMappingURL=
|
|
3887
|
+
//# sourceMappingURL=zh_guide_basic_test-your-project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/
|
|
1
|
+
{"version":3,"file":"static/js/async/zh_guide_basic_test-your-project.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;;;;AAYA;;AAEA;;AAAA;;AAAA;;;;AAiBA;;AAAA","sources":["webpack://@modern-js/module-tools-docs/./docs/zh/guide/basic/test-your-project.mdx"],"names":[],"sourceRoot":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["
|
|
2
|
+
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["zh_guide_basic_use-micro-generator"],{
|
|
3
3
|
|
|
4
4
|
/***/ "./docs/zh/guide/basic/use-micro-generator.md":
|
|
5
5
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -14,10 +14,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14
14
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js");
|
|
15
15
|
/*@jsxRuntime automatic @jsxImportSource react*/
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const frontmatter = {
|
|
18
18
|
"sidebar_position": 4
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
const toc = [{
|
|
21
|
+
"id": "test-测试",
|
|
22
|
+
"text": "Test 测试",
|
|
23
|
+
"depth": 2
|
|
24
|
+
}, {
|
|
21
25
|
"id": "storybook-调试",
|
|
22
26
|
"text": "Storybook 调试",
|
|
23
27
|
"depth": 2
|
|
@@ -30,10 +34,10 @@ var toc = [{
|
|
|
30
34
|
"text": "启动 Modern.js Runtime API",
|
|
31
35
|
"depth": 2
|
|
32
36
|
}];
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
const title = `使用微生成器`;
|
|
38
|
+
const content = "\"---\\nsidebar_position: 4\\n---\\n\\n# 使用微生成器\\n\\n模块工程解决方案提供了微生成器工具,它可以为当前项目:\\n\\n- 新增目录和文件\\n- 修改 `package.json` 文件内容\\n- 执行命令\\n\\n因此通过这些能力,**微生成器可以为项目开启额外的特性功能**。\\n\\n可以通过 [`modern new`](/guide/basic/command-preview) 启动微生成器。目前模块工程方案支持的微生成器功能有:\\n\\n## Test 测试\\n\\n当我们想要对一些模块进行测试的时候,可以启用 test 测试功能。启动该功能后,**会在项目目录下创建 `tests` 目录以及相关文件,在 package.json 中新增 `\\\"@modern-js/plugin-testing\\\"` 依赖**。\\n\\n## Storybook 调试\\n\\n当我们想要对组件或者普通模块进行调试的时候,可以启用 Storybook 调试功能。启动该功能后,**会在项目目录下创建 `stories` 目录以及相关文件,在 package.json 中新增 `\\\"@modern-js/plugin-storybook\\\"` 依赖**。\\n\\n关于如何启动 Storybook 以及如何使用 Storybook,可以查看下面的链接:\\n\\n- [`modern dev`](/guide/basic/command-preview#modern-dev)\\n- [使用 Storybook](/guide/basic/using-storybook)\\n\\n## Tailwind CSS 支持\\n\\n当我们想要为项目增加 [Tailwind CSS](https://v2.tailwindcss.com/) 支持的时候,可以启动这个功能。Tailwind CSS 是一个 CSS 库,提供开箱即用的样式。\\n\\n关于如何在模块工程里使用 Tailwind CSS,可以查看:\\n\\n- [使用 Tailwind CSS](https://modernjs.dev/docs/apis/module/config/tools/tailwindcss)\\n\\n## 启动 Modern.js Runtime API\\n\\n**Modern.js 提供了 [Runtime API](https://modernjs.dev/docs/apis/module/runtime/) 能力,这些 API 只能在 Modern.js 的应用项目环境中使用**。如果你需要开发一个 Modern.js 应用环境中使用的组件,那么你可以开启该特性,微生成器会增加 `\\\"@modern-js/runtime\\\"`依赖。\\n\\n另外,Storybook 调试工具也会通过检测项目的依赖确定项目是否需要使用 Runtime API,并且提供与 Modern.js 应用项目一样的 Runtime API 运行环境。\\n\"";
|
|
35
39
|
function _createMdxContent(props) {
|
|
36
|
-
|
|
40
|
+
const _components = Object.assign({
|
|
37
41
|
h1: "h1",
|
|
38
42
|
a: "a",
|
|
39
43
|
p: "p",
|
|
@@ -70,11 +74,27 @@ function _createMdxContent(props) {
|
|
|
70
74
|
}), "。"]
|
|
71
75
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
72
76
|
children: ["可以通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
73
|
-
href: "/guide/basic/command-preview.html",
|
|
77
|
+
href: "/module-tools/guide/basic/command-preview.html",
|
|
74
78
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
75
79
|
children: "modern new"
|
|
76
80
|
})
|
|
77
81
|
}), " 启动微生成器。目前模块工程方案支持的微生成器功能有:"]
|
|
82
|
+
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h2, {
|
|
83
|
+
id: "test-测试",
|
|
84
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
85
|
+
className: "header-anchor",
|
|
86
|
+
"aria-hidden": "true",
|
|
87
|
+
href: "#test-测试",
|
|
88
|
+
children: "#"
|
|
89
|
+
}), "Test 测试"]
|
|
90
|
+
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
91
|
+
children: ["当我们想要对一些模块进行测试的时候,可以启用 test 测试功能。启动该功能后,", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.strong, {
|
|
92
|
+
children: ["会在项目目录下创建 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
93
|
+
children: "tests"
|
|
94
|
+
}), " 目录以及相关文件,在 package.json 中新增 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
95
|
+
children: "\"@modern-js/plugin-testing\""
|
|
96
|
+
}), " 依赖"]
|
|
97
|
+
}), "。"]
|
|
78
98
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h2, {
|
|
79
99
|
id: "storybook-调试",
|
|
80
100
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
@@ -84,9 +104,7 @@ function _createMdxContent(props) {
|
|
|
84
104
|
children: "#"
|
|
85
105
|
}), "Storybook 调试"]
|
|
86
106
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
87
|
-
children: ["当我们想要对组件或者普通模块进行调试的时候,可以启用 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
88
|
-
children: "Storybook 调试功能"
|
|
89
|
-
}), "。启动该功能后,", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.strong, {
|
|
107
|
+
children: ["当我们想要对组件或者普通模块进行调试的时候,可以启用 Storybook 调试功能。启动该功能后,", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.strong, {
|
|
90
108
|
children: ["会在项目目录下创建 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
91
109
|
children: "stories"
|
|
92
110
|
}), " 目录以及相关文件,在 package.json 中新增 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
@@ -98,14 +116,14 @@ function _createMdxContent(props) {
|
|
|
98
116
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
99
117
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
100
118
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
101
|
-
href: "/guide/basic/command-preview#modern-dev
|
|
119
|
+
href: "/module-tools/guide/basic/command-preview.html#modern-dev-1",
|
|
102
120
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
103
121
|
children: "modern dev"
|
|
104
122
|
})
|
|
105
123
|
})
|
|
106
124
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
107
125
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
108
|
-
href: "/guide/basic/using-storybook.html",
|
|
126
|
+
href: "/module-tools/guide/basic/using-storybook.html",
|
|
109
127
|
children: "使用 Storybook"
|
|
110
128
|
})
|
|
111
129
|
}), "\n"]
|
|
@@ -120,6 +138,8 @@ function _createMdxContent(props) {
|
|
|
120
138
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
121
139
|
children: ["当我们想要为项目增加 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
122
140
|
href: "https://v2.tailwindcss.com/",
|
|
141
|
+
target: "_blank",
|
|
142
|
+
rel: "nofollow",
|
|
123
143
|
children: "Tailwind CSS"
|
|
124
144
|
}), " 支持的时候,可以启动这个功能。Tailwind CSS 是一个 CSS 库,提供开箱即用的样式。"]
|
|
125
145
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.p, {
|
|
@@ -128,6 +148,8 @@ function _createMdxContent(props) {
|
|
|
128
148
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
129
149
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
130
150
|
href: "https://modernjs.dev/docs/apis/module/config/tools/tailwindcss",
|
|
151
|
+
target: "_blank",
|
|
152
|
+
rel: "nofollow",
|
|
131
153
|
children: "使用 Tailwind CSS"
|
|
132
154
|
})
|
|
133
155
|
}), "\n"]
|
|
@@ -143,6 +165,8 @@ function _createMdxContent(props) {
|
|
|
143
165
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.strong, {
|
|
144
166
|
children: ["Modern.js 提供了 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
145
167
|
href: "https://modernjs.dev/docs/apis/module/runtime/",
|
|
168
|
+
target: "_blank",
|
|
169
|
+
rel: "nofollow",
|
|
146
170
|
children: "Runtime API"
|
|
147
171
|
}), " 能力,这些 API 只能在 Modern.js 的应用项目环境中使用"]
|
|
148
172
|
}), "。如果你需要开发一个 Modern.js 应用环境中使用的组件,那么你可以开启该特性,微生成器会增加 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
@@ -153,20 +177,16 @@ function _createMdxContent(props) {
|
|
|
153
177
|
})]
|
|
154
178
|
});
|
|
155
179
|
}
|
|
156
|
-
function MDXContent() {
|
|
157
|
-
|
|
158
|
-
var _ref = props.components || {},
|
|
159
|
-
MDXLayout = _ref.wrapper;
|
|
180
|
+
function MDXContent(props = {}) {
|
|
181
|
+
const {wrapper: MDXLayout} = props.components || ({});
|
|
160
182
|
return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
|
|
161
183
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
|
|
162
184
|
})) : _createMdxContent(props);
|
|
163
185
|
}
|
|
164
|
-
_c = MDXContent;
|
|
165
186
|
/* harmony default export */ __webpack_exports__["default"] = (MDXContent);
|
|
166
|
-
|
|
167
|
-
__webpack_require__.$Refresh$.register(_c, "MDXContent");
|
|
187
|
+
|
|
168
188
|
|
|
169
189
|
/***/ })
|
|
170
190
|
|
|
171
191
|
}]);
|
|
172
|
-
//# sourceMappingURL=
|
|
192
|
+
//# sourceMappingURL=zh_guide_basic_use-micro-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/js/async/zh_guide_basic_use-micro-generator.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAEA;;;AAEA;;AACA;;AAAA;;AACA;;;AAEA;AAAA;AAAA;;AAEA;;;;;AAAA;;;;;;;;AAEA;;AAEA;AAAA;;AAAA;;AAAA;AAAA;;;;;;;;AAEA;;AAEA;AAAA;;AAAA;;AAAA;AAAA;;AAEA;;;;;;;;;;;;AAGA;;;;;;;;;;AAEA;;AAEA;;;;AAAA;AAAA;;AAEA;;;;;;;AAEA;;;;;;;;;;AAEA;;;AAEA;;;;AAAA;AAAA;AAAA;;AAAA;;AAEA","sources":["webpack://@modern-js/module-tools-docs/./docs/zh/guide/basic/use-micro-generator.md"],"names":[],"sourceRoot":""}
|