@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,260 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as c}from"react/jsx-runtime";import{a as l,S as d,b as p,C as u}from"./components.esm.03560353.js";import"react";import"react-dom";const n={annotations:l,Spotlight:d,CodeSlot:p,Code:u},s={staticMediaQuery:"not screen, (max-width: 768px)",theme:{name:"nord",type:"dark",semanticHighlighting:!0,colors:{focusBorder:"#3b4252",foreground:"#d8dee9","activityBar.background":"#2e3440","activityBar.dropBackground":"#3b4252","activityBar.foreground":"#d8dee9","activityBar.activeBorder":"#88c0d0","activityBar.activeBackground":"#3b4252","activityBarBadge.background":"#88c0d0","activityBarBadge.foreground":"#2e3440","badge.foreground":"#2e3440","badge.background":"#88c0d0","button.background":"#88c0d0ee","button.foreground":"#2e3440","button.hoverBackground":"#88c0d0","button.secondaryBackground":"#434c5e","button.secondaryForeground":"#d8dee9","button.secondaryHoverBackground":"#4c566a","charts.red":"#bf616a","charts.blue":"#81a1c1","charts.yellow":"#ebcb8b","charts.orange":"#d08770","charts.green":"#a3be8c","charts.purple":"#b48ead","charts.foreground":"#d8dee9","charts.lines":"#88c0d0","debugConsole.infoForeground":"#88c0d0","debugConsole.warningForeground":"#ebcb8b","debugConsole.errorForeground":"#bf616a","debugConsole.sourceForeground":"#616e88","debugConsoleInputIcon.foreground":"#81a1c1","debugExceptionWidget.background":"#4c566a","debugExceptionWidget.border":"#2e3440","debugToolBar.background":"#3b4252",descriptionForeground:"#d8dee9e6","diffEditor.insertedTextBackground":"#81a1c133","diffEditor.removedTextBackground":"#bf616a4d","dropdown.background":"#3b4252","dropdown.border":"#3b4252","dropdown.foreground":"#d8dee9","editorActiveLineNumber.foreground":"#d8dee9cc","editorCursor.foreground":"#d8dee9","editorHint.border":"#ebcb8b00","editorHint.foreground":"#ebcb8b","editorIndentGuide.background":"#434c5eb3","editorIndentGuide.activeBackground":"#4c566a","editorInlayHint.background":"#434c5e","editorInlayHint.foreground":"#d8dee9","editorLineNumber.foreground":"#4c566a","editorLineNumber.activeForeground":"#d8dee9","editorWhitespace.foreground":"#4c566ab3","editorWidget.background":"#2e3440","editorWidget.border":"#3b4252","editor.background":"#2e3440","editor.foreground":"#d8dee9","editor.hoverHighlightBackground":"#3b4252","editor.findMatchBackground":"#88c0d066","editor.findMatchHighlightBackground":"#88c0d033","editor.findRangeHighlightBackground":"#88c0d033","editor.lineHighlightBackground":"#3b4252","editor.lineHighlightBorder":"#3b4252","editor.inactiveSelectionBackground":"#434c5ecc","editor.inlineValuesBackground":"#4c566a","editor.inlineValuesForeground":"#eceff4","editor.selectionBackground":"#434c5ecc","editor.selectionHighlightBackground":"#434c5ecc","editor.rangeHighlightBackground":"#434c5e52","editor.wordHighlightBackground":"#81a1c166","editor.wordHighlightStrongBackground":"#81a1c199","editor.stackFrameHighlightBackground":"#5e81ac","editor.focusedStackFrameHighlightBackground":"#5e81ac","editorError.foreground":"#bf616a","editorError.border":"#bf616a00","editorWarning.foreground":"#ebcb8b","editorWarning.border":"#ebcb8b00","editorBracketMatch.background":"#2e344000","editorBracketMatch.border":"#88c0d0","editorBracketHighlight.foreground1":"#8fbcbb","editorBracketHighlight.foreground2":"#88c0d0","editorBracketHighlight.foreground3":"#81a1c1","editorBracketHighlight.foreground4":"#5e81ac","editorBracketHighlight.foreground5":"#8fbcbb","editorBracketHighlight.foreground6":"#88c0d0","editorBracketHighlight.unexpectedBracket.foreground":"#bf616a","editorCodeLens.foreground":"#4c566a","editorGroup.background":"#2e3440","editorGroup.border":"#3b425201","editorGroup.dropBackground":"#3b425299","editorGroupHeader.border":"#3b425200","editorGroupHeader.noTabsBackground":"#2e3440","editorGroupHeader.tabsBackground":"#2e3440","editorGroupHeader.tabsBorder":"#3b425200","editorGutter.background":"#2e3440","editorGutter.modifiedBackground":"#ebcb8b","editorGutter.addedBackground":"#a3be8c","editorGutter.deletedBackground":"#bf616a","editorHoverWidget.background":"#3b4252","editorHoverWidget.border":"#3b4252","editorLink.activeForeground":"#88c0d0","editorMarkerNavigation.background":"#5e81acc0","editorMarkerNavigationError.background":"#bf616ac0","editorMarkerNavigationWarning.background":"#ebcb8bc0","editorOverviewRuler.border":"#3b4252","editorOverviewRuler.currentContentForeground":"#3b4252","editorOverviewRuler.incomingContentForeground":"#3b4252","editorOverviewRuler.findMatchForeground":"#88c0d066","editorOverviewRuler.rangeHighlightForeground":"#88c0d066","editorOverviewRuler.selectionHighlightForeground":"#88c0d066","editorOverviewRuler.wordHighlightForeground":"#88c0d066","editorOverviewRuler.wordHighlightStrongForeground":"#88c0d066","editorOverviewRuler.modifiedForeground":"#ebcb8b","editorOverviewRuler.addedForeground":"#a3be8c","editorOverviewRuler.deletedForeground":"#bf616a","editorOverviewRuler.errorForeground":"#bf616a","editorOverviewRuler.warningForeground":"#ebcb8b","editorOverviewRuler.infoForeground":"#81a1c1","editorRuler.foreground":"#434c5e","editorSuggestWidget.background":"#2e3440","editorSuggestWidget.border":"#3b4252","editorSuggestWidget.foreground":"#d8dee9","editorSuggestWidget.focusHighlightForeground":"#88c0d0","editorSuggestWidget.highlightForeground":"#88c0d0","editorSuggestWidget.selectedBackground":"#434c5e","editorSuggestWidget.selectedForeground":"#d8dee9","extensionButton.prominentForeground":"#d8dee9","extensionButton.prominentBackground":"#434c5e","extensionButton.prominentHoverBackground":"#4c566a",errorForeground:"#bf616a","gitDecoration.modifiedResourceForeground":"#ebcb8b","gitDecoration.deletedResourceForeground":"#bf616a","gitDecoration.untrackedResourceForeground":"#a3be8c","gitDecoration.ignoredResourceForeground":"#d8dee966","gitDecoration.conflictingResourceForeground":"#5e81ac","gitDecoration.submoduleResourceForeground":"#8fbcbb","gitDecoration.stageDeletedResourceForeground":"#bf616a","gitDecoration.stageModifiedResourceForeground":"#ebcb8b","input.background":"#3b4252","input.foreground":"#d8dee9","input.placeholderForeground":"#d8dee999","input.border":"#3b4252","inputOption.activeBackground":"#5e81ac","inputOption.activeBorder":"#5e81ac","inputOption.activeForeground":"#eceff4","inputValidation.errorBackground":"#bf616a","inputValidation.errorBorder":"#bf616a","inputValidation.infoBackground":"#81a1c1","inputValidation.infoBorder":"#81a1c1","inputValidation.warningBackground":"#d08770","inputValidation.warningBorder":"#d08770","keybindingLabel.background":"#4c566a","keybindingLabel.border":"#4c566a","keybindingLabel.bottomBorder":"#4c566a","keybindingLabel.foreground":"#d8dee9","list.activeSelectionBackground":"#88c0d0","list.activeSelectionForeground":"#2e3440","list.inactiveSelectionBackground":"#434c5e","list.inactiveSelectionForeground":"#d8dee9","list.inactiveFocusBackground":"#434c5ecc","list.hoverForeground":"#eceff4","list.focusForeground":"#d8dee9","list.focusBackground":"#88c0d099","list.focusHighlightForeground":"#eceff4","list.hoverBackground":"#3b4252","list.dropBackground":"#88c0d099","list.highlightForeground":"#88c0d0","list.errorForeground":"#bf616a","list.warningForeground":"#ebcb8b","merge.currentHeaderBackground":"#81a1c166","merge.currentContentBackground":"#81a1c14d","merge.incomingHeaderBackground":"#8fbcbb66","merge.incomingContentBackground":"#8fbcbb4d","merge.border":"#3b425200","minimap.background":"#2e3440","minimap.errorHighlight":"#bf616acc","minimap.findMatchHighlight":"#88c0d0","minimap.selectionHighlight":"#88c0d0cc","minimap.warningHighlight":"#ebcb8bcc","minimapGutter.addedBackground":"#a3be8c","minimapGutter.deletedBackground":"#bf616a","minimapGutter.modifiedBackground":"#ebcb8b","minimapSlider.activeBackground":"#434c5eaa","minimapSlider.background":"#434c5e99","minimapSlider.hoverBackground":"#434c5eaa","notification.background":"#3b4252","notification.buttonBackground":"#434c5e","notification.buttonForeground":"#d8dee9","notification.buttonHoverBackground":"#4c566a","notification.errorBackground":"#bf616a","notification.errorForeground":"#2e3440","notification.foreground":"#d8dee9","notification.infoBackground":"#88c0d0","notification.infoForeground":"#2e3440","notification.warningBackground":"#ebcb8b","notification.warningForeground":"#2e3440","notificationCenter.border":"#3b425200","notificationCenterHeader.background":"#2e3440","notificationCenterHeader.foreground":"#88c0d0","notificationLink.foreground":"#88c0d0","notifications.background":"#3b4252","notifications.border":"#2e3440","notifications.foreground":"#d8dee9","notificationToast.border":"#3b425200","panel.background":"#2e3440","panel.border":"#3b4252","panelTitle.activeBorder":"#88c0d000","panelTitle.activeForeground":"#88c0d0","panelTitle.inactiveForeground":"#d8dee9","peekView.border":"#4c566a","peekViewEditor.background":"#2e3440","peekViewEditorGutter.background":"#2e3440","peekViewEditor.matchHighlightBackground":"#88c0d04d","peekViewResult.background":"#2e3440","peekViewResult.fileForeground":"#88c0d0","peekViewResult.lineForeground":"#d8dee966","peekViewResult.matchHighlightBackground":"#88c0d0cc","peekViewResult.selectionBackground":"#434c5e","peekViewResult.selectionForeground":"#d8dee9","peekViewTitle.background":"#3b4252","peekViewTitleDescription.foreground":"#d8dee9","peekViewTitleLabel.foreground":"#88c0d0","pickerGroup.border":"#3b4252","pickerGroup.foreground":"#88c0d0","progressBar.background":"#88c0d0","quickInputList.focusBackground":"#88c0d0","quickInputList.focusForeground":"#2e3440","sash.hoverBorder":"#88c0d0","scrollbar.shadow":"#00000066","scrollbarSlider.activeBackground":"#434c5eaa","scrollbarSlider.background":"#434c5e99","scrollbarSlider.hoverBackground":"#434c5eaa","selection.background":"#88c0d099","sideBar.background":"#2e3440","sideBar.foreground":"#d8dee9","sideBar.border":"#3b4252","sideBarSectionHeader.background":"#3b4252","sideBarSectionHeader.foreground":"#d8dee9","sideBarTitle.foreground":"#d8dee9","statusBar.background":"#3b4252","statusBar.debuggingBackground":"#5e81ac","statusBar.debuggingForeground":"#d8dee9","statusBar.noFolderForeground":"#d8dee9","statusBar.noFolderBackground":"#3b4252","statusBar.foreground":"#d8dee9","statusBarItem.activeBackground":"#4c566a","statusBarItem.hoverBackground":"#434c5e","statusBarItem.prominentBackground":"#3b4252","statusBarItem.prominentHoverBackground":"#434c5e","statusBarItem.errorBackground":"#3b4252","statusBarItem.errorForeground":"#bf616a","statusBarItem.warningBackground":"#ebcb8b","statusBarItem.warningForeground":"#2e3440","statusBar.border":"#3b425200","tab.activeBackground":"#3b4252","tab.activeForeground":"#d8dee9","tab.border":"#3b425200","tab.activeBorder":"#88c0d000","tab.unfocusedActiveBorder":"#88c0d000","tab.inactiveBackground":"#2e3440","tab.inactiveForeground":"#d8dee966","tab.unfocusedActiveForeground":"#d8dee999","tab.unfocusedInactiveForeground":"#d8dee966","tab.hoverBackground":"#3b4252cc","tab.unfocusedHoverBackground":"#3b4252b3","tab.hoverBorder":"#88c0d000","tab.unfocusedHoverBorder":"#88c0d000","tab.activeBorderTop":"#88c0d000","tab.unfocusedActiveBorderTop":"#88c0d000","tab.lastPinnedBorder":"#4c566a","terminal.background":"#2e3440","terminal.foreground":"#d8dee9","terminal.ansiBlack":"#3b4252","terminal.ansiRed":"#bf616a","terminal.ansiGreen":"#a3be8c","terminal.ansiYellow":"#ebcb8b","terminal.ansiBlue":"#81a1c1","terminal.ansiMagenta":"#b48ead","terminal.ansiCyan":"#88c0d0","terminal.ansiWhite":"#e5e9f0","terminal.ansiBrightBlack":"#4c566a","terminal.ansiBrightRed":"#bf616a","terminal.ansiBrightGreen":"#a3be8c","terminal.ansiBrightYellow":"#ebcb8b","terminal.ansiBrightBlue":"#81a1c1","terminal.ansiBrightMagenta":"#b48ead","terminal.ansiBrightCyan":"#8fbcbb","terminal.ansiBrightWhite":"#eceff4","terminal.tab.activeBorder":"#88c0d0","textBlockQuote.background":"#3b4252","textBlockQuote.border":"#81a1c1","textCodeBlock.background":"#4c566a","textLink.activeForeground":"#88c0d0","textLink.foreground":"#88c0d0","textPreformat.foreground":"#8fbcbb","textSeparator.foreground":"#eceff4","titleBar.activeBackground":"#2e3440","titleBar.activeForeground":"#d8dee9","titleBar.border":"#2e344000","titleBar.inactiveBackground":"#2e3440","titleBar.inactiveForeground":"#d8dee966","tree.indentGuidesStroke":"#616e88","walkThrough.embeddedEditorBackground":"#2e3440","welcomePage.buttonBackground":"#434c5e","welcomePage.buttonHoverBackground":"#4c566a","widget.shadow":"#00000066"},tokenColors:[{settings:{foreground:"#d8dee9ff",background:"#2e3440ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{name:"Comment",scope:"comment",settings:{foreground:"#616E88"}},{name:"Constant Character",scope:"constant.character",settings:{foreground:"#EBCB8B"}},{name:"Constant Character Escape",scope:"constant.character.escape",settings:{foreground:"#EBCB8B"}},{name:"Constant Language",scope:"constant.language",settings:{foreground:"#81A1C1"}},{name:"Constant Numeric",scope:"constant.numeric",settings:{foreground:"#B48EAD"}},{name:"Constant Regexp",scope:"constant.regexp",settings:{foreground:"#EBCB8B"}},{name:"Entity Name Class/Type",scope:["entity.name.class","entity.name.type.class"],settings:{foreground:"#8FBCBB"}},{name:"Entity Name Function",scope:"entity.name.function",settings:{foreground:"#88C0D0"}},{name:"Entity Name Tag",scope:"entity.name.tag",settings:{foreground:"#81A1C1"}},{name:"Entity Other Attribute Name",scope:"entity.other.attribute-name",settings:{foreground:"#8FBCBB"}},{name:"Entity Other Inherited Class",scope:"entity.other.inherited-class",settings:{fontStyle:"bold",foreground:"#8FBCBB"}},{name:"Invalid Deprecated",scope:"invalid.deprecated",settings:{foreground:"#D8DEE9",background:"#EBCB8B"}},{name:"Invalid Illegal",scope:"invalid.illegal",settings:{foreground:"#D8DEE9",background:"#BF616A"}},{name:"Keyword",scope:"keyword",settings:{foreground:"#81A1C1"}},{name:"Keyword Operator",scope:"keyword.operator",settings:{foreground:"#81A1C1"}},{name:"Keyword Other New",scope:"keyword.other.new",settings:{foreground:"#81A1C1"}},{name:"Markup Bold",scope:"markup.bold",settings:{fontStyle:"bold"}},{name:"Markup Changed",scope:"markup.changed",settings:{foreground:"#EBCB8B"}},{name:"Markup Deleted",scope:"markup.deleted",settings:{foreground:"#BF616A"}},{name:"Markup Inserted",scope:"markup.inserted",settings:{foreground:"#A3BE8C"}},{name:"Meta Preprocessor",scope:"meta.preprocessor",settings:{foreground:"#5E81AC"}},{name:"Punctuation",scope:"punctuation",settings:{foreground:"#ECEFF4"}},{name:"Punctuation Definition Parameters",scope:["punctuation.definition.method-parameters","punctuation.definition.function-parameters","punctuation.definition.parameters"],settings:{foreground:"#ECEFF4"}},{name:"Punctuation Definition Tag",scope:"punctuation.definition.tag",settings:{foreground:"#81A1C1"}},{name:"Punctuation Definition Comment",scope:["punctuation.definition.comment","punctuation.end.definition.comment","punctuation.start.definition.comment"],settings:{foreground:"#616E88"}},{name:"Punctuation Section",scope:"punctuation.section",settings:{foreground:"#ECEFF4"}},{name:"Punctuation Section Embedded",scope:["punctuation.section.embedded.begin","punctuation.section.embedded.end"],settings:{foreground:"#81A1C1"}},{name:"Punctuation Terminator",scope:"punctuation.terminator",settings:{foreground:"#81A1C1"}},{name:"Punctuation Variable",scope:"punctuation.definition.variable",settings:{foreground:"#81A1C1"}},{name:"Storage",scope:"storage",settings:{foreground:"#81A1C1"}},{name:"String",scope:"string",settings:{foreground:"#A3BE8C"}},{name:"String Regexp",scope:"string.regexp",settings:{foreground:"#EBCB8B"}},{name:"Support Class",scope:"support.class",settings:{foreground:"#8FBCBB"}},{name:"Support Constant",scope:"support.constant",settings:{foreground:"#81A1C1"}},{name:"Support Function",scope:"support.function",settings:{foreground:"#88C0D0"}},{name:"Support Function Construct",scope:"support.function.construct",settings:{foreground:"#81A1C1"}},{name:"Support Type",scope:"support.type",settings:{foreground:"#8FBCBB"}},{name:"Support Type Exception",scope:"support.type.exception",settings:{foreground:"#8FBCBB"}},{name:"Token Debug",scope:"token.debug-token",settings:{foreground:"#b48ead"}},{name:"Token Error",scope:"token.error-token",settings:{foreground:"#bf616a"}},{name:"Token Info",scope:"token.info-token",settings:{foreground:"#88c0d0"}},{name:"Token Warning",scope:"token.warn-token",settings:{foreground:"#ebcb8b"}},{name:"Variable",scope:"variable.other",settings:{foreground:"#D8DEE9"}},{name:"Variable Language",scope:"variable.language",settings:{foreground:"#81A1C1"}},{name:"Variable Parameter",scope:"variable.parameter",settings:{foreground:"#D8DEE9"}},{name:"[C/CPP] Punctuation Separator Pointer-Access",scope:"punctuation.separator.pointer-access.c",settings:{foreground:"#81A1C1"}},{name:"[C/CPP] Meta Preprocessor Include",scope:["source.c meta.preprocessor.include","source.c string.quoted.other.lt-gt.include"],settings:{foreground:"#8FBCBB"}},{name:"[C/CPP] Conditional Directive",scope:["source.cpp keyword.control.directive.conditional","source.cpp punctuation.definition.directive","source.c keyword.control.directive.conditional","source.c punctuation.definition.directive"],settings:{foreground:"#5E81AC",fontStyle:"bold"}},{name:"[CSS] Constant Other Color RGB Value",scope:"source.css constant.other.color.rgb-value",settings:{foreground:"#B48EAD"}},{name:"[CSS](Function) Meta Property-Value",scope:"source.css meta.property-value",settings:{foreground:"#88C0D0"}},{name:"[CSS] Media Queries",scope:["source.css keyword.control.at-rule.media","source.css keyword.control.at-rule.media punctuation.definition.keyword"],settings:{foreground:"#D08770"}},{name:"[CSS] Punctuation Definition Keyword",scope:"source.css punctuation.definition.keyword",settings:{foreground:"#81A1C1"}},{name:"[CSS] Support Type Property Name",scope:"source.css support.type.property-name",settings:{foreground:"#D8DEE9"}},{name:"[diff] Meta Range Context",scope:"source.diff meta.diff.range.context",settings:{foreground:"#8FBCBB"}},{name:"[diff] Meta Header From-File",scope:"source.diff meta.diff.header.from-file",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition From-File",scope:"source.diff punctuation.definition.from-file",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition Range",scope:"source.diff punctuation.definition.range",settings:{foreground:"#8FBCBB"}},{name:"[diff] Punctuation Definition Separator",scope:"source.diff punctuation.definition.separator",settings:{foreground:"#81A1C1"}},{name:"[Elixir](JakeBecker.elixir-ls) module names",scope:"entity.name.type.module.elixir",settings:{foreground:"#8FBCBB"}},{name:"[Elixir](JakeBecker.elixir-ls) module attributes",scope:"variable.other.readwrite.module.elixir",settings:{foreground:"#D8DEE9",fontStyle:"bold"}},{name:"[Elixir](JakeBecker.elixir-ls) atoms",scope:"constant.other.symbol.elixir",settings:{foreground:"#D8DEE9",fontStyle:"bold"}},{name:"[Elixir](JakeBecker.elixir-ls) modules",scope:"variable.other.constant.elixir",settings:{foreground:"#8FBCBB"}},{name:"[Go] String Format Placeholder",scope:"source.go constant.other.placeholder.go",settings:{foreground:"#EBCB8B"}},{name:"[Java](JavaDoc) Comment Block Documentation HTML Entities",scope:"source.java comment.block.documentation.javadoc punctuation.definition.entity.html",settings:{foreground:"#81A1C1"}},{name:"[Java](JavaDoc) Constant Other",scope:"source.java constant.other",settings:{foreground:"#D8DEE9"}},{name:"[Java](JavaDoc) Keyword Other Documentation",scope:"source.java keyword.other.documentation",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation Author",scope:"source.java keyword.other.documentation.author.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation Directive/Custom",scope:["source.java keyword.other.documentation.directive","source.java keyword.other.documentation.custom"],settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Keyword Other Documentation See",scope:"source.java keyword.other.documentation.see.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java] Meta Method-Call",scope:"source.java meta.method-call meta.method",settings:{foreground:"#88C0D0"}},{name:"[Java](JavaDoc) Meta Tag Template Link",scope:["source.java meta.tag.template.link.javadoc","source.java string.other.link.title.javadoc"],settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Meta Tag Template Value",scope:"source.java meta.tag.template.value.javadoc",settings:{foreground:"#88C0D0"}},{name:"[Java](JavaDoc) Punctuation Definition Keyword",scope:"source.java punctuation.definition.keyword.javadoc",settings:{foreground:"#8FBCBB"}},{name:"[Java](JavaDoc) Punctuation Definition Tag",scope:["source.java punctuation.definition.tag.begin.javadoc","source.java punctuation.definition.tag.end.javadoc"],settings:{foreground:"#616E88"}},{name:"[Java] Storage Modifier Import",scope:"source.java storage.modifier.import",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Modifier Package",scope:"source.java storage.modifier.package",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type",scope:"source.java storage.type",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type Annotation",scope:"source.java storage.type.annotation",settings:{foreground:"#D08770"}},{name:"[Java] Storage Type Generic",scope:"source.java storage.type.generic",settings:{foreground:"#8FBCBB"}},{name:"[Java] Storage Type Primitive",scope:"source.java storage.type.primitive",settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Decorator",scope:["source.js punctuation.decorator","source.js meta.decorator variable.other.readwrite","source.js meta.decorator entity.name.function"],settings:{foreground:"#D08770"}},{name:"[JavaScript] Meta Object-Literal Key",scope:"source.js meta.object-literal.key",settings:{foreground:"#88C0D0"}},{name:"[JavaScript](JSDoc) Storage Type Class",scope:"source.js storage.type.class.jsdoc",settings:{foreground:"#8FBCBB"}},{name:"[JavaScript] String Template Literals Punctuation",scope:["source.js string.quoted.template punctuation.quasi.element.begin","source.js string.quoted.template punctuation.quasi.element.end","source.js string.template punctuation.definition.template-expression"],settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Interpolated String Template Punctuation Functions",scope:"source.js string.quoted.template meta.method-call.with-arguments",settings:{foreground:"#ECEFF4"}},{name:"[JavaScript] String Template Literal Variable",scope:["source.js string.template meta.template.expression support.variable.property","source.js string.template meta.template.expression variable.other.object"],settings:{foreground:"#D8DEE9"}},{name:"[JavaScript] Support Type Primitive",scope:"source.js support.type.primitive",settings:{foreground:"#81A1C1"}},{name:"[JavaScript] Variable Other Object",scope:"source.js variable.other.object",settings:{foreground:"#D8DEE9"}},{name:"[JavaScript] Variable Other Read-Write Alias",scope:"source.js variable.other.readwrite.alias",settings:{foreground:"#8FBCBB"}},{name:"[JavaScript] Parentheses in Template Strings",scope:["source.js meta.embedded.line meta.brace.square","source.js meta.embedded.line meta.brace.round","source.js string.quoted.template meta.brace.square","source.js string.quoted.template meta.brace.round"],settings:{foreground:"#ECEFF4"}},{name:"[HTML] Constant Character Entity",scope:"text.html.basic constant.character.entity.html",settings:{foreground:"#EBCB8B"}},{name:"[HTML] Constant Other Inline-Data",scope:"text.html.basic constant.other.inline-data",settings:{foreground:"#D08770",fontStyle:"italic"}},{name:"[HTML] Meta Tag SGML Doctype",scope:"text.html.basic meta.tag.sgml.doctype",settings:{foreground:"#5E81AC"}},{name:"[HTML] Punctuation Definition Entity",scope:"text.html.basic punctuation.definition.entity",settings:{foreground:"#81A1C1"}},{name:"[INI] Entity Name Section Group-Title",scope:"source.properties entity.name.section.group-title.ini",settings:{foreground:"#88C0D0"}},{name:"[INI] Punctuation Separator Key-Value",scope:"source.properties punctuation.separator.key-value.ini",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Fenced Code Block",scope:["text.html.markdown markup.fenced_code.block","text.html.markdown markup.fenced_code.block punctuation.definition"],settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Heading",scope:"markup.heading",settings:{foreground:"#88C0D0"}},{name:"[Markdown] Markup Inline",scope:["text.html.markdown markup.inline.raw","text.html.markdown markup.inline.raw punctuation.definition.raw"],settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Italic",scope:"text.html.markdown markup.italic",settings:{fontStyle:"italic"}},{name:"[Markdown] Markup Link",scope:"text.html.markdown markup.underline.link",settings:{fontStyle:"underline"}},{name:"[Markdown] Markup List Numbered/Unnumbered",scope:"text.html.markdown beginning.punctuation.definition.list",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Quote Punctuation Definition",scope:"text.html.markdown beginning.punctuation.definition.quote",settings:{foreground:"#8FBCBB"}},{name:"[Markdown] Markup Quote Punctuation Definition",scope:"text.html.markdown markup.quote",settings:{foreground:"#616E88"}},{name:"[Markdown] Markup Math Constant",scope:"text.html.markdown constant.character.math.tex",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Markup Math Definition Marker",scope:["text.html.markdown punctuation.definition.math.begin","text.html.markdown punctuation.definition.math.end"],settings:{foreground:"#5E81AC"}},{name:"[Markdown] Markup Math Function Definition Marker",scope:"text.html.markdown punctuation.definition.function.math.tex",settings:{foreground:"#88C0D0"}},{name:"[Markdown] Markup Math Operator",scope:"text.html.markdown punctuation.math.operator.latex",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Punctuation Definition Heading",scope:"text.html.markdown punctuation.definition.heading",settings:{foreground:"#81A1C1"}},{name:"[Markdown] Punctuation Definition Constant/String",scope:["text.html.markdown punctuation.definition.constant","text.html.markdown punctuation.definition.string"],settings:{foreground:"#81A1C1"}},{name:"[Markdown] String Other Link Description/Title",scope:["text.html.markdown constant.other.reference.link","text.html.markdown string.other.link.description","text.html.markdown string.other.link.title"],settings:{foreground:"#88C0D0"}},{name:"[Perl] Perl Sigils",scope:"source.perl punctuation.definition.variable",settings:{foreground:"#D8DEE9"}},{name:"[PHP] Meta Function-Call Object",scope:["source.php meta.function-call","source.php meta.function-call.object"],settings:{foreground:"#88C0D0"}},{name:"[Python] Decorator",scope:["source.python entity.name.function.decorator","source.python meta.function.decorator support.type"],settings:{foreground:"#D08770"}},{name:"[Python] Function Call",scope:"source.python meta.function-call.generic",settings:{foreground:"#88C0D0"}},{name:"[Python] Support Type",scope:"source.python support.type",settings:{foreground:"#88C0D0"}},{name:"[Python] Function Parameter",scope:["source.python variable.parameter.function.language"],settings:{foreground:"#D8DEE9"}},{name:"[Python] Function Parameter Special",scope:["source.python meta.function.parameters variable.parameter.function.language.special.self"],settings:{foreground:"#81A1C1"}},{name:"[Rust] Entity types",scope:"source.rust entity.name.type",settings:{foreground:"#8FBCBB"}},{name:"[Rust] Macro",scope:"source.rust meta.macro entity.name.function",settings:{fontStyle:"bold",foreground:"#88C0D0"}},{name:"[Rust] Attributes",scope:["source.rust meta.attribute","source.rust meta.attribute punctuation","source.rust meta.attribute keyword.operator"],settings:{foreground:"#5E81AC"}},{name:"[Rust] Traits",scope:"source.rust entity.name.type.trait",settings:{fontStyle:"bold"}},{name:"[Rust] Interpolation Bracket Curly",scope:"source.rust punctuation.definition.interpolation",settings:{foreground:"#EBCB8B"}},{name:"[SCSS] Punctuation Definition Interpolation Bracket Curly",scope:["source.css.scss punctuation.definition.interpolation.begin.bracket.curly","source.css.scss punctuation.definition.interpolation.end.bracket.curly"],settings:{foreground:"#81A1C1"}},{name:"[SCSS] Variable Interpolation",scope:"source.css.scss variable.interpolation",settings:{foreground:"#D8DEE9",fontStyle:"italic"}},{name:"[TypeScript] Decorators",scope:["source.ts punctuation.decorator","source.ts meta.decorator variable.other.readwrite","source.ts meta.decorator entity.name.function","source.tsx punctuation.decorator","source.tsx meta.decorator variable.other.readwrite","source.tsx meta.decorator entity.name.function"],settings:{foreground:"#D08770"}},{name:"[TypeScript] Object-literal keys",scope:["source.ts meta.object-literal.key","source.tsx meta.object-literal.key"],settings:{foreground:"#D8DEE9"}},{name:"[TypeScript] Object-literal functions",scope:["source.ts meta.object-literal.key entity.name.function","source.tsx meta.object-literal.key entity.name.function"],settings:{foreground:"#88C0D0"}},{name:"[TypeScript] Type/Class",scope:["source.ts support.class","source.ts support.type","source.ts entity.name.type","source.ts entity.name.class","source.tsx support.class","source.tsx support.type","source.tsx entity.name.type","source.tsx entity.name.class"],settings:{foreground:"#8FBCBB"}},{name:"[TypeScript] Static Class Support",scope:["source.ts support.constant.math","source.ts support.constant.dom","source.ts support.constant.json","source.tsx support.constant.math","source.tsx support.constant.dom","source.tsx support.constant.json"],settings:{foreground:"#8FBCBB"}},{name:"[TypeScript] Variables",scope:["source.ts support.variable","source.tsx support.variable"],settings:{foreground:"#D8DEE9"}},{name:"[TypeScript] Parentheses in Template Strings",scope:["source.ts meta.embedded.line meta.brace.square","source.ts meta.embedded.line meta.brace.round","source.tsx meta.embedded.line meta.brace.square","source.tsx meta.embedded.line meta.brace.round"],settings:{foreground:"#ECEFF4"}},{name:"[XML] Entity Name Tag Namespace",scope:"text.xml entity.name.tag.namespace",settings:{foreground:"#8FBCBB"}},{name:"[XML] Keyword Other Doctype",scope:"text.xml keyword.other.doctype",settings:{foreground:"#5E81AC"}},{name:"[XML] Meta Tag Preprocessor",scope:"text.xml meta.tag.preprocessor entity.name.tag",settings:{foreground:"#5E81AC"}},{name:"[XML] Entity Name Tag Namespace",scope:["text.xml string.unquoted.cdata","text.xml string.unquoted.cdata punctuation.definition.string"],settings:{foreground:"#D08770",fontStyle:"italic"}},{name:"[YAML] Entity Name Tag",scope:"source.yaml entity.name.tag",settings:{foreground:"#8FBCBB"}}]},autoImport:!0,showCopyButton:!0,enableSpa:!0,skipLanguages:[],filepath:"/Users/targeral/github/targeral-modern-js/website/module-tools/docs/en/guide/basic/using-storybook.mdx"},E=void 0,f=[{id:"debugging-code",text:"Debugging code",depth:2},{id:"referencing-component-products",text:"Referencing component products",depth:3},{id:"referencing-component-source-code",text:"Referencing component source code",depth:3},{id:"configure-storybook",text:"Configure Storybook",depth:2},{id:"configuration-file",text:"Configuration file",depth:3},{id:"devstorybook",text:"dev.storybook",depth:3},{id:"building-storybook-products",text:"Building Storybook Products",depth:3}],h="Using Storybook";function a(r){const o=Object.assign({h1:"h1",a:"a",p:"p",ul:"ul",li:"li",code:"code",h2:"h2",strong:"strong",h3:"h3",blockquote:"blockquote",ol:"ol"},r.components);return n||i("CH",!1),n.Code||i("CH.Code",!0),n.CodeSlot||i("CH.CodeSlot",!0),n.Spotlight||i("CH.Spotlight",!0),t(c,{children:[t(o.h1,{id:"using-storybook",children:[e(o.a,{className:"header-anchor","aria-hidden":"true",href:"#using-storybook",children:"#"}),"Using Storybook"]}),`
|
|
2
|
+
`,e(o.p,{children:"First of all, if you haven't read the following, take a few minutes to understand it first."}),`
|
|
3
|
+
`,t(o.ul,{children:[`
|
|
4
|
+
`,e(o.li,{children:e(o.a,{href:"/en/guide/use-micro-generator.html#storybook-debug",children:"use micro-generator to enable Storybook debugging"})}),`
|
|
5
|
+
`,e(o.li,{children:e(o.a,{href:"/en/guide/command-preview.html#modern-dev",children:e(o.code,{children:"modern dev"})})}),`
|
|
6
|
+
`]}),`
|
|
7
|
+
`,t(o.p,{children:[e(o.a,{href:"https://storybook.js.org/",target:"_blank",rel:"nofollow",children:"Storybook"})," is a tool dedicated to component debugging, providing around component development."]}),`
|
|
8
|
+
`,t(o.ul,{children:[`
|
|
9
|
+
`,e(o.li,{children:"Develop UIs that are more durable"}),`
|
|
10
|
+
`,e(o.li,{children:"Test UIs with less effort and no flakes"}),`
|
|
11
|
+
`,e(o.li,{children:"Document UI for your team to reuse"}),`
|
|
12
|
+
`,e(o.li,{children:"Share how the UI actually works"}),`
|
|
13
|
+
`,e(o.li,{children:"Automate UI workflows"}),`
|
|
14
|
+
`]}),`
|
|
15
|
+
`,e(o.p,{children:"So it is a complex and powerful tool."}),`
|
|
16
|
+
`,e(o.p,{children:"The modular engineering solution is integrated with Storybook, so you can pretty much follow the official Storybook documentation. However, there are still a few things to keep in mind, which are explained below."}),`
|
|
17
|
+
`,t(o.h2,{id:"debugging-code",children:[e(o.a,{className:"header-anchor","aria-hidden":"true",href:"#debugging-code",children:"#"}),"Debugging code"]}),`
|
|
18
|
+
`,e(o.p,{children:"Component code needs to be introduced during debugging code, and currently component code can be introduced in two ways:"}),`
|
|
19
|
+
`,t(o.ul,{children:[`
|
|
20
|
+
`,e(o.li,{children:"Referencing the component product"}),`
|
|
21
|
+
`,e(o.li,{children:"Referencing component source code"}),`
|
|
22
|
+
`]}),`
|
|
23
|
+
`,t(o.p,{children:['We recommend the first way of "',e(o.strong,{children:"referencing component product"}),'". Because it is almost close to the real usage scenario, not only can we debug the component functionality, but also verify the correctness of the build product.']}),`
|
|
24
|
+
`,e(o.p,{children:"Next, we will talk about how to use each of these two methods."}),`
|
|
25
|
+
`,t(o.h3,{id:"referencing-component-products",children:[e(o.a,{className:"header-anchor","aria-hidden":"true",href:"#referencing-component-products",children:"#"}),"Referencing component products"]}),`
|
|
26
|
+
`,t(o.p,{children:["If the TypeScript project ",e(o.code,{children:"foo"})," exists."]}),`
|
|
27
|
+
`,t(n.Spotlight,{codeConfig:s,editorSteps:[{northPanel:{tabs:["package.json"],active:"package.json",heightRatio:1},files:[{name:"package.json",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"name",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"foo",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"main",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/index.js",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"types",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/types/index.d.ts",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"json"},annotations:[]}]},{northPanel:{tabs:["package.json"],active:"package.json",heightRatio:1},files:[{name:"package.json",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"name",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"foo",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"main",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/index.js",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"types",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/types/index.d.ts",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"json"},annotations:[]}],southPanel:void 0},{northPanel:{tabs:["package.json","src/index.ts"],active:"src/index.ts",heightRatio:1},files:[{name:"package.json",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"name",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"foo",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"main",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/index.js",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"types",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/types/index.d.ts",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"json"},annotations:[]},{name:"src/index.ts",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"content",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"hello world",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"typescript"},annotations:[]}],southPanel:void 0},{northPanel:{tabs:["package.json","stories/tsconfig.json"],active:"stories/tsconfig.json",heightRatio:1},files:[{name:"package.json",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"name",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"foo",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"main",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/index.js",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"types",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/types/index.d.ts",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"json"},annotations:[]},{name:"stories/tsconfig.json",focus:"7:9",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"extends",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"../tsconfig.json",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"include",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"[",props:{style:{color:"#ECEFF4"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"],",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"compilerOptions",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"jsx",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"preserve",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"baseUrl",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:".",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"paths",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"foo",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"[",props:{style:{color:"#ECEFF4"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"../",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"]",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"json"},annotations:[]}],southPanel:void 0},{northPanel:{tabs:["package.json","stories/index.stories.tsx"],active:"stories/index.stories.tsx",heightRatio:1},files:[{name:"package.json",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"name",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"foo",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"main",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/index.js",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"types",props:{style:{color:"#8FBCBB"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/types/index.d.ts",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"json"},annotations:[]},{name:"stories/index.stories.tsx",focus:"1:1",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"content",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"from",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"foo",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"Component",props:{style:{color:"#88C0D0"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"<div>",props:{style:{color:"#81A1C1"}}},{content:"this is a Story Component ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#81A1C1"}}},{content:"content",props:{style:{color:"#D8DEE9"}}},{content:"}</div>;",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"YourStory",props:{style:{color:"#88C0D0"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"<",props:{style:{color:"#81A1C1"}}},{content:"Component",props:{style:{color:"#8FBCBB"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"/>;",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"title",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"Your Stories",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"tsx"},annotations:[]}],southPanel:void 0}],children:[e(c,{children:e(n.CodeSlot,{})}),t(c,{children:[t(o.p,{children:["Make sure the ",e(o.code,{children:"main"})," and ",e(o.code,{children:"types"})," of ",e(o.code,{children:"package.json"}),`
|
|
28
|
+
values are real paths.`]}),e(n.CodeSlot,{})]}),t(c,{children:[t(o.p,{children:["The source code of the ",e(o.code,{children:"foo"})," project."]}),e(n.CodeSlot,{})]}),t(c,{children:[t(o.p,{children:["Make sure that the ",e(o.code,{children:"paths"})," configuration pointing to the project root is set in ",e(o.code,{children:"stories/tsconfig.json"}),`.
|
|
29
|
+
The `,e(o.code,{children:"key"})," of ",e(o.code,{children:"paths"})," is the same as the project name."]}),e(n.CodeSlot,{})]}),t(c,{children:[e(o.p,{children:"Finally, it is referenced directly in the Story code by the project name."}),e(n.CodeSlot,{})]})]}),`
|
|
30
|
+
`,e(o.p,{children:"If, during development, you encounter a situation where the type definition is not available in real time, at that point."}),`
|
|
31
|
+
`,t(o.p,{children:["For ",e(o.code,{children:"pnpm"})," projects, ",e(o.code,{children:"package.json"})," can be modified as follows."]}),`
|
|
32
|
+
`,e(n.Code,{codeConfig:s,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"4:7",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"name",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:": ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"foo",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"main",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:": ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/index.js",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"types",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:": ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./src/index.ts",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"publishConfig",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:": ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"types",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:"./dist/index.d.ts",props:{style:{color:"#A3BE8C"}}},{content:'"',props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}}]}],lang:"ts"},annotations:[]}]}),`
|
|
33
|
+
`,t(o.blockquote,{children:[`
|
|
34
|
+
`,t(o.p,{children:["For the use of pnpm's ",e(o.code,{children:"publishConfig"}),", you can read the following ",e(o.a,{href:"https://pnpm.io/package_json#publishconfig",target:"_blank",rel:"nofollow",children:"link"}),"."]}),`
|
|
35
|
+
`]}),`
|
|
36
|
+
`,t(o.p,{children:["For npm and Yarn projects, the values of ",e(o.code,{children:"types"})," of ",e(o.code,{children:"package.json"})," can only be changed manually in ",e(o.strong,{children:"development phase"})," and ",e(o.strong,{children:"release phase"}),"."]}),`
|
|
37
|
+
`,e(o.p,{children:"So why is it possible to reference the product directly?"}),`
|
|
38
|
+
`,t(o.ol,{children:[`
|
|
39
|
+
`,t(o.li,{children:["the ",e(o.code,{children:"modern build"})," command is executed automatically before the ",e(o.code,{children:"modern dev storybook"})," command, ensuring the existence of the project build product."]}),`
|
|
40
|
+
`,t(o.li,{children:["The project name is added as an alias inside Storybook to ensure that the path to the project's product can be parsed ",t(o.strong,{children:["according to ",e(o.code,{children:"package.json"})]}),"."]}),`
|
|
41
|
+
`]}),`
|
|
42
|
+
`,t(o.h3,{id:"referencing-component-source-code",children:[e(o.a,{className:"header-anchor","aria-hidden":"true",href:"#referencing-component-source-code",children:"#"}),"Referencing component source code"]}),`
|
|
43
|
+
`,e(o.p,{children:"Referencing component source code can be done by means of relative paths to:"}),`
|
|
44
|
+
`,e(n.Code,{codeConfig:s,northPanel:{tabs:["./stories/index.tsx"],active:"./stories/index.tsx",heightRatio:1},files:[{name:"./stories/index.tsx",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"content",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"from",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"../src",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"Component",props:{style:{color:"#88C0D0"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" <",props:{style:{color:"#D8DEE9FF"}}},{content:"div",props:{style:{color:"#8FBCBB"}}},{content:">",props:{style:{color:"#D8DEE9FF"}}},{content:"this",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"is",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"a",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"Story",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"Component",props:{style:{color:"#D8DEE9"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}},{content:"content",props:{style:{color:"#D8DEE9"}}},{content:"}",props:{style:{color:"#ECEFF4"}}},{content:"</",props:{style:{color:"#81A1C1"}}},{content:"div",props:{style:{color:"#D8DEE9"}}},{content:">;",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"const",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"YourStory",props:{style:{color:"#88C0D0"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"()",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"=>",props:{style:{color:"#81A1C1"}}},{content:" <",props:{style:{color:"#D8DEE9FF"}}},{content:"Component",props:{style:{color:"#8FBCBB"}}},{content:" />",props:{style:{color:"#D8DEE9FF"}}},{content:";",props:{style:{color:"#81A1C1"}}}]},{tokens:[]},{tokens:[{content:"export",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"default",props:{style:{color:"#81A1C1"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"{",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"title",props:{style:{color:"#D8DEE9"}}},{content:":",props:{style:{color:"#ECEFF4"}}},{content:" ",props:{style:{color:"#D8DEE9FF"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:"Your Stories",props:{style:{color:"#A3BE8C"}}},{content:"'",props:{style:{color:"#ECEFF4"}}},{content:",",props:{style:{color:"#ECEFF4"}}}]},{tokens:[{content:"}",props:{style:{color:"#ECEFF4"}}},{content:";",props:{style:{color:"#81A1C1"}}}]}],lang:"ts"},annotations:[]}]}),`
|
|
45
|
+
`,e(o.p,{children:"So why is the source code approach not recommended?"}),`
|
|
46
|
+
`,t(o.p,{children:["Not only is it impossible to verify that the component product is correct using the component source code, ",e(o.strong,{children:"but also some of the configurations supported by the module project for building the product cannot be fully translated into Storybook internal configuration"}),". If some of the configurations cannot be converted to each other, there will be unintended results during Storybook debugging."]}),`
|
|
47
|
+
`,t(o.h2,{id:"configure-storybook",children:[e(o.a,{className:"header-anchor","aria-hidden":"true",href:"#configure-storybook",children:"#"}),"Configure Storybook"]}),`
|
|
48
|
+
`,t(o.h3,{id:"configuration-file",children:[e(o.a,{className:"header-anchor","aria-hidden":"true",href:"#configuration-file",children:"#"}),"Configuration file"]}),`
|
|
49
|
+
`,t(o.p,{children:["Storybook is officially configured for projects through a folder called ",e(o.code,{children:".storybook"}),", which contains various configuration files. ",t(o.strong,{children:["In a module project scenario, Storybook configuration files can be added to the ",e(o.code,{children:"config/storybook"})," directory of the project."]})]}),`
|
|
50
|
+
`,e(o.p,{children:"For more information on how to use the various Storybook configuration files, see the following links:"}),`
|
|
51
|
+
`,t(o.ul,{children:[`
|
|
52
|
+
`,e(o.li,{children:e(o.a,{href:"https://storybook.js.org/docs/react/configure/overview",target:"_blank",rel:"nofollow",children:"Configure Storybook"})}),`
|
|
53
|
+
`]}),`
|
|
54
|
+
`,t(o.p,{children:[e(o.strong,{children:"But there are some limitations to Storybooking in a module project"}),":"]}),`
|
|
55
|
+
`,t(o.ul,{children:[`
|
|
56
|
+
`,t(o.li,{children:["It is currently not possible to change the location of the Story file, i.e., you cannot change the ",e(o.code,{children:"stories"})," configuration in the ",e(o.code,{children:"main.js"})," file."]}),`
|
|
57
|
+
`,t(o.li,{children:["Currently you cannot modify Webpack and Babel related configuration, i.e. you cannot modify ",e(o.code,{children:"webpackFinal"})," and ",e(o.code,{children:"babel"})," configuration in the ",e(o.code,{children:"main.js"})," file."]}),`
|
|
58
|
+
`]}),`
|
|
59
|
+
`,e(o.p,{children:"In the future we will consider whether these configurations can be allowed to be modified, but for now we are limiting their use to reduce unpredictable issues."}),`
|
|
60
|
+
`,t(o.h3,{id:"devstorybook",children:[e(o.a,{className:"header-anchor","aria-hidden":"true",href:"#devstorybook",children:"#"}),e(o.code,{children:"dev.storybook"})]}),`
|
|
61
|
+
`,t(o.p,{children:["In addition to the configuration file, the module engineering solution also provides a ",e(o.code,{children:"dev.storybook"})," configuration item in the ",e(o.code,{children:"modern.config.(j|t)s"})," project configuration file."]}),`
|
|
62
|
+
`,e(o.p,{children:"The webpack configuration of Storybook can be modified via this configuration."}),`
|
|
63
|
+
`,t(o.ul,{children:[`
|
|
64
|
+
`,e(o.li,{children:e(o.a,{href:"/xxx.html",children:e(o.code,{children:"dev.storybook.webpack"})})}),`
|
|
65
|
+
`]}),`
|
|
66
|
+
`,t(o.h3,{id:"building-storybook-products",children:[e(o.a,{className:"header-anchor","aria-hidden":"true",href:"#building-storybook-products",children:"#"}),"Building Storybook Products"]}),`
|
|
67
|
+
`,e(o.p,{children:"In addition to Storybook debugging of components or common modules, you can also perform Storybook build tasks with the following commands."}),`
|
|
68
|
+
`,e(n.Code,{codeConfig:s,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"modern build --platform storybook",props:{style:{color:"#D8DEE9FF"}}}]}],lang:"bash"},annotations:[]}]}),`
|
|
69
|
+
`,t(o.p,{children:["For the ",e(o.code,{children:"modern build --platform"})," command you can see."]}),`
|
|
70
|
+
`,t(o.ul,{children:[`
|
|
71
|
+
`,e(o.li,{children:e(o.a,{href:"/en/guide/command-preview.html#modern-build",children:e(o.code,{children:"modern build"})})}),`
|
|
72
|
+
`]}),`
|
|
73
|
+
`,t(o.p,{children:["After the build is complete, you can see the build product files in the ",e(o.code,{children:"dist/storybook-static"})," directory."]})]})}function b(r={}){const{wrapper:o}=r.components||{};return o?e(o,Object.assign({},r,{children:e(a,r)})):a(r)}function i(r,o){throw new Error("Expected "+(o?"component":"object")+" `"+r+"` to be defined: you likely forgot to import, pass, or provide it.")}const C="2022/12/15 18:01:48",k=`# Using Storybook
|
|
74
|
+
|
|
75
|
+
First of all, if you haven't read the following, take a few minutes to understand it first.
|
|
76
|
+
|
|
77
|
+
* [use micro-generator to enable Storybook debugging](/en/guide/use-micro-generator#storybook-debug)
|
|
78
|
+
* [\`modern dev\`](/en/guide/command-preview#modern-dev)
|
|
79
|
+
|
|
80
|
+
[Storybook](https://storybook.js.org/) is a tool dedicated to component debugging, providing around component development.
|
|
81
|
+
|
|
82
|
+
* Develop UIs that are more durable
|
|
83
|
+
* Test UIs with less effort and no flakes
|
|
84
|
+
* Document UI for your team to reuse
|
|
85
|
+
* Share how the UI actually works
|
|
86
|
+
* Automate UI workflows
|
|
87
|
+
|
|
88
|
+
So it is a complex and powerful tool.
|
|
89
|
+
|
|
90
|
+
The modular engineering solution is integrated with Storybook, so you can pretty much follow the official Storybook documentation. However, there are still a few things to keep in mind, which are explained below.
|
|
91
|
+
|
|
92
|
+
## Debugging code
|
|
93
|
+
|
|
94
|
+
Component code needs to be introduced during debugging code, and currently component code can be introduced in two ways:
|
|
95
|
+
|
|
96
|
+
* Referencing the component product
|
|
97
|
+
* Referencing component source code
|
|
98
|
+
|
|
99
|
+
We recommend the first way of "**referencing component product**". Because it is almost close to the real usage scenario, not only can we debug the component functionality, but also verify the correctness of the build product.
|
|
100
|
+
|
|
101
|
+
Next, we will talk about how to use each of these two methods.
|
|
102
|
+
|
|
103
|
+
### Referencing component products
|
|
104
|
+
|
|
105
|
+
If the TypeScript project \`foo\` exists.
|
|
106
|
+
|
|
107
|
+
<CH.Spotlight>
|
|
108
|
+
|
|
109
|
+
\`\`\`json package.json
|
|
110
|
+
{
|
|
111
|
+
"name": "foo",
|
|
112
|
+
"main": "./dist/index.js",
|
|
113
|
+
"types": "./dist/types/index.d.ts"
|
|
114
|
+
}
|
|
115
|
+
\`\`\`
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
Make sure the \`main\` and \`types\` of \`package.json\`
|
|
120
|
+
values are real paths.
|
|
121
|
+
|
|
122
|
+
\`\`\`json package.json
|
|
123
|
+
{
|
|
124
|
+
"name": "foo",
|
|
125
|
+
"main": "./dist/index.js",
|
|
126
|
+
"types": "./dist/types/index.d.ts"
|
|
127
|
+
}
|
|
128
|
+
\`\`\`
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
The source code of the \`foo\` project.
|
|
133
|
+
|
|
134
|
+
\`\`\`typescript src/index.ts
|
|
135
|
+
export const content = 'hello world';
|
|
136
|
+
\`\`\`
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
Make sure that the \`paths\` configuration pointing to the project root is set in \`stories/tsconfig.json\`.
|
|
142
|
+
The \`key\` of \`paths\` is the same as the project name.
|
|
143
|
+
|
|
144
|
+
\`\`\`json stories/tsconfig.json focus=7:9
|
|
145
|
+
{
|
|
146
|
+
"extends": "../tsconfig.json",
|
|
147
|
+
"include": ["./"],
|
|
148
|
+
"compilerOptions": {
|
|
149
|
+
"jsx": "preserve",
|
|
150
|
+
"baseUrl": ".",
|
|
151
|
+
"paths": {
|
|
152
|
+
"foo": ["../"]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
\`\`\`
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
Finally, it is referenced directly in the Story code by the project name.
|
|
161
|
+
|
|
162
|
+
\`\`\`tsx stories/index.stories.tsx focus=1:1
|
|
163
|
+
import { content } from 'foo';
|
|
164
|
+
|
|
165
|
+
const Component = () => <div>this is a Story Component {content}</div>;
|
|
166
|
+
|
|
167
|
+
export const YourStory = () => <Component />;
|
|
168
|
+
|
|
169
|
+
export default {
|
|
170
|
+
title: 'Your Stories',
|
|
171
|
+
};
|
|
172
|
+
\`\`\`
|
|
173
|
+
|
|
174
|
+
</CH.Spotlight>
|
|
175
|
+
|
|
176
|
+
If, during development, you encounter a situation where the type definition is not available in real time, at that point.
|
|
177
|
+
|
|
178
|
+
For \`pnpm\` projects, \`package.json\` can be modified as follows.
|
|
179
|
+
|
|
180
|
+
\`\`\` ts focus=4:7
|
|
181
|
+
{
|
|
182
|
+
"name": "foo",
|
|
183
|
+
"main": "./dist/index.js",
|
|
184
|
+
"types": "./src/index.ts",
|
|
185
|
+
"publishConfig": {
|
|
186
|
+
"types": "./dist/index.d.ts",
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
\`\`\`
|
|
190
|
+
> For the use of pnpm's \`publishConfig\`, you can read the following [link](https://pnpm.io/package_json#publishconfig).
|
|
191
|
+
|
|
192
|
+
For npm and Yarn projects, the values of \`types\` of \`package.json\` can only be changed manually in **development phase** and **release phase**.
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
So why is it possible to reference the product directly?
|
|
196
|
+
|
|
197
|
+
1. the \`modern build\` command is executed automatically before the \`modern dev storybook\` command, ensuring the existence of the project build product.
|
|
198
|
+
2. The project name is added as an alias inside Storybook to ensure that the path to the project's product can be parsed **according to \`package.json\`**.
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
### Referencing component source code
|
|
202
|
+
|
|
203
|
+
Referencing component source code can be done by means of relative paths to:
|
|
204
|
+
|
|
205
|
+
\`\`\`ts ./stories/index.tsx
|
|
206
|
+
import { content } from '../src';
|
|
207
|
+
|
|
208
|
+
const Component = () => <div>this is a Story Component {content}</div>;
|
|
209
|
+
|
|
210
|
+
export const YourStory = () => <Component />;
|
|
211
|
+
|
|
212
|
+
export default {
|
|
213
|
+
title: 'Your Stories',
|
|
214
|
+
};
|
|
215
|
+
\`\`\`
|
|
216
|
+
|
|
217
|
+
So why is the source code approach not recommended?
|
|
218
|
+
|
|
219
|
+
Not only is it impossible to verify that the component product is correct using the component source code, **but also some of the configurations supported by the module project for building the product cannot be fully translated into Storybook internal configuration**. If some of the configurations cannot be converted to each other, there will be unintended results during Storybook debugging.
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## Configure Storybook
|
|
223
|
+
|
|
224
|
+
### Configuration file
|
|
225
|
+
|
|
226
|
+
Storybook is officially configured for projects through a folder called \`.storybook\`, which contains various configuration files. **In a module project scenario, Storybook configuration files can be added to the \`config/storybook\` directory of the project.**
|
|
227
|
+
|
|
228
|
+
For more information on how to use the various Storybook configuration files, see the following links:
|
|
229
|
+
|
|
230
|
+
* [Configure Storybook](https://storybook.js.org/docs/react/configure/overview)
|
|
231
|
+
|
|
232
|
+
**But there are some limitations to Storybooking in a module project**:
|
|
233
|
+
|
|
234
|
+
* It is currently not possible to change the location of the Story file, i.e., you cannot change the \`stories\` configuration in the \`main.js\` file.
|
|
235
|
+
* Currently you cannot modify Webpack and Babel related configuration, i.e. you cannot modify \`webpackFinal\` and \`babel\` configuration in the \`main.js\` file.
|
|
236
|
+
|
|
237
|
+
In the future we will consider whether these configurations can be allowed to be modified, but for now we are limiting their use to reduce unpredictable issues.
|
|
238
|
+
|
|
239
|
+
### \`dev.storybook\`
|
|
240
|
+
|
|
241
|
+
In addition to the configuration file, the module engineering solution also provides a \`dev.storybook\` configuration item in the \`modern.config.(j|t)s\` project configuration file.
|
|
242
|
+
|
|
243
|
+
The webpack configuration of Storybook can be modified via this configuration.
|
|
244
|
+
|
|
245
|
+
* [\`dev.storybook.webpack\`](xxx)
|
|
246
|
+
|
|
247
|
+
### Building Storybook Products
|
|
248
|
+
|
|
249
|
+
In addition to Storybook debugging of components or common modules, you can also perform Storybook build tasks with the following commands.
|
|
250
|
+
|
|
251
|
+
\`\`\` bash
|
|
252
|
+
modern build --platform storybook
|
|
253
|
+
\`\`\`
|
|
254
|
+
|
|
255
|
+
For the \`modern build --platform\` command you can see.
|
|
256
|
+
|
|
257
|
+
* [\`modern build\`](/en/guide/command-preview#modern-build)
|
|
258
|
+
|
|
259
|
+
After the build is complete, you can see the build product files in the \`dist/storybook-static\` directory.
|
|
260
|
+
`;export{n as CH,s as chCodeConfig,k as content,b as default,E as frontmatter,C as lastUpdatedTime,h as title,f as toc};
|