From 2c3f11339542e045b25e54ccf40da4d7e97472a6 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Thu, 23 Nov 2023 22:21:52 +0800 Subject: [PATCH] :memo: docs: update with docs by zh-CN suffix (#123) * :memo: docs: update with docs by zh-CN suffix * :memo: docs: update with docs by zh-CN suffix * :memo: docs: update with docs by zh-CN suffix * :pushpin: ci: pin to vite@4 to fix ci temperately * :memo: docs: update with docs by zh-CN suffix --- .dumirc.ts | 4 ++++ README.md => README.zh-CN.md | 0 docs/api/{create-instance.md => create-instance.zh-CN.md} | 0 docs/api/{create-styles.md => create-styles.zh-CN.md} | 0 docs/api/{create-stylish.md => create-stylish.zh-CN.md} | 0 docs/api/{global-styles.md => global-styles.zh-CN.md} | 0 docs/api/{setup-styled.md => setup-styled.zh-CN.md} | 0 docs/api/{style-provider.md => style-provider.zh-CN.md} | 0 docs/api/{theme-provider.md => theme-provider.zh-CN.md} | 0 docs/api/{use-responsive.md => use-responsive.zh-CN.md} | 0 docs/api/{use-theme-mode.md => use-theme-mode.zh-CN.md} | 0 docs/api/{use-theme.md => use-theme.zh-CN.md} | 0 ...ntd-based-components.md => antd-based-components.zh-CN.md} | 0 .../{antd-override.md => antd-override.zh-CN.md} | 0 docs/best-practice/{clay.md => clay.zh-CN.md} | 0 .../{custom-token-types.md => custom-token-types.zh-CN.md} | 0 ...ix-switch-theme-fouc.md => fix-switch-theme-fouc.zh-CN.md} | 0 docs/best-practice/{index.md => index.zh-CN.md} | 0 docs/best-practice/{mac-select.md => mac-select.zh-CN.md} | 0 ...-global-style.md => mirgration-less-global-style.zh-CN.md} | 0 .../{nest-element-style.md => nest-element-style.zh-CN.md} | 0 .../{static-message.md => static-message.zh-CN.md} | 0 docs/best-practice/{styled.md => styled.zh-CN.md} | 0 docs/{changelog.md => changelog.zh-CN.md} | 0 docs/guide/{babel-plugin.md => babel-plugin.zh-CN.md} | 0 docs/guide/{compare.md => compare.zh-CN.md} | 0 docs/guide/{components-usage.md => components-usage.zh-CN.md} | 0 docs/guide/{create-styles.md => create-styles.zh-CN.md} | 0 docs/guide/{css-in-js-intro.md => css-in-js-intro.zh-CN.md} | 0 ...ler-difference.md => cssinjs-compiler-difference.zh-CN.md} | 0 docs/guide/{custom-theme.md => custom-theme.zh-CN.md} | 0 docs/guide/{index.md => index.zh-CN.md} | 0 ...-less-application.md => migrate-less-application.zh-CN.md} | 0 ...{migrate-less-codemod.md => migrate-less-codemod.zh-CN.md} | 0 ...rate-less-component.md => migrate-less-component.zh-CN.md} | 0 ...formance-comparsion.md => performance-comparsion.zh-CN.md} | 0 docs/guide/{ssr.md => ssr.zh-CN.md} | 0 docs/guide/{strategy.md => strategy.zh-CN.md} | 0 docs/guide/{styled.md => styled.zh-CN.md} | 0 docs/guide/{stylish.md => stylish.zh-CN.md} | 0 docs/guide/{switch-theme.md => switch-theme.zh-CN.md} | 0 docs/{index.md => index.zh-CN.md} | 0 package.json | 1 + tsconfig.json | 2 +- 44 files changed, 6 insertions(+), 1 deletion(-) rename README.md => README.zh-CN.md (100%) rename docs/api/{create-instance.md => create-instance.zh-CN.md} (100%) rename docs/api/{create-styles.md => create-styles.zh-CN.md} (100%) rename docs/api/{create-stylish.md => create-stylish.zh-CN.md} (100%) rename docs/api/{global-styles.md => global-styles.zh-CN.md} (100%) rename docs/api/{setup-styled.md => setup-styled.zh-CN.md} (100%) rename docs/api/{style-provider.md => style-provider.zh-CN.md} (100%) rename docs/api/{theme-provider.md => theme-provider.zh-CN.md} (100%) rename docs/api/{use-responsive.md => use-responsive.zh-CN.md} (100%) rename docs/api/{use-theme-mode.md => use-theme-mode.zh-CN.md} (100%) rename docs/api/{use-theme.md => use-theme.zh-CN.md} (100%) rename docs/best-practice/{antd-based-components.md => antd-based-components.zh-CN.md} (100%) rename docs/best-practice/{antd-override.md => antd-override.zh-CN.md} (100%) rename docs/best-practice/{clay.md => clay.zh-CN.md} (100%) rename docs/best-practice/{custom-token-types.md => custom-token-types.zh-CN.md} (100%) rename docs/best-practice/{fix-switch-theme-fouc.md => fix-switch-theme-fouc.zh-CN.md} (100%) rename docs/best-practice/{index.md => index.zh-CN.md} (100%) rename docs/best-practice/{mac-select.md => mac-select.zh-CN.md} (100%) rename docs/best-practice/{mirgration-less-global-style.md => mirgration-less-global-style.zh-CN.md} (100%) rename docs/best-practice/{nest-element-style.md => nest-element-style.zh-CN.md} (100%) rename docs/best-practice/{static-message.md => static-message.zh-CN.md} (100%) rename docs/best-practice/{styled.md => styled.zh-CN.md} (100%) rename docs/{changelog.md => changelog.zh-CN.md} (100%) rename docs/guide/{babel-plugin.md => babel-plugin.zh-CN.md} (100%) rename docs/guide/{compare.md => compare.zh-CN.md} (100%) rename docs/guide/{components-usage.md => components-usage.zh-CN.md} (100%) rename docs/guide/{create-styles.md => create-styles.zh-CN.md} (100%) rename docs/guide/{css-in-js-intro.md => css-in-js-intro.zh-CN.md} (100%) rename docs/guide/{cssinjs-compiler-difference.md => cssinjs-compiler-difference.zh-CN.md} (100%) rename docs/guide/{custom-theme.md => custom-theme.zh-CN.md} (100%) rename docs/guide/{index.md => index.zh-CN.md} (100%) rename docs/guide/{migrate-less-application.md => migrate-less-application.zh-CN.md} (100%) rename docs/guide/{migrate-less-codemod.md => migrate-less-codemod.zh-CN.md} (100%) rename docs/guide/{migrate-less-component.md => migrate-less-component.zh-CN.md} (100%) rename docs/guide/{performance-comparsion.md => performance-comparsion.zh-CN.md} (100%) rename docs/guide/{ssr.md => ssr.zh-CN.md} (100%) rename docs/guide/{strategy.md => strategy.zh-CN.md} (100%) rename docs/guide/{styled.md => styled.zh-CN.md} (100%) rename docs/guide/{stylish.md => stylish.zh-CN.md} (100%) rename docs/guide/{switch-theme.md => switch-theme.zh-CN.md} (100%) rename docs/{index.md => index.zh-CN.md} (100%) diff --git a/.dumirc.ts b/.dumirc.ts index e46020ed..1329d8a0 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -42,6 +42,10 @@ export default defineConfig({ html, body { background: #0E1116; } }`, ], + locales: [ + { name: 'English', id: 'en-US' }, + { name: '简体中文', id: 'zh-CN' }, + ], extraBabelPlugins: [ // 添加 antd-style babel 插件 require.resolve('babel-plugin-antd-style'), diff --git a/README.md b/README.zh-CN.md similarity index 100% rename from README.md rename to README.zh-CN.md diff --git a/docs/api/create-instance.md b/docs/api/create-instance.zh-CN.md similarity index 100% rename from docs/api/create-instance.md rename to docs/api/create-instance.zh-CN.md diff --git a/docs/api/create-styles.md b/docs/api/create-styles.zh-CN.md similarity index 100% rename from docs/api/create-styles.md rename to docs/api/create-styles.zh-CN.md diff --git a/docs/api/create-stylish.md b/docs/api/create-stylish.zh-CN.md similarity index 100% rename from docs/api/create-stylish.md rename to docs/api/create-stylish.zh-CN.md diff --git a/docs/api/global-styles.md b/docs/api/global-styles.zh-CN.md similarity index 100% rename from docs/api/global-styles.md rename to docs/api/global-styles.zh-CN.md diff --git a/docs/api/setup-styled.md b/docs/api/setup-styled.zh-CN.md similarity index 100% rename from docs/api/setup-styled.md rename to docs/api/setup-styled.zh-CN.md diff --git a/docs/api/style-provider.md b/docs/api/style-provider.zh-CN.md similarity index 100% rename from docs/api/style-provider.md rename to docs/api/style-provider.zh-CN.md diff --git a/docs/api/theme-provider.md b/docs/api/theme-provider.zh-CN.md similarity index 100% rename from docs/api/theme-provider.md rename to docs/api/theme-provider.zh-CN.md diff --git a/docs/api/use-responsive.md b/docs/api/use-responsive.zh-CN.md similarity index 100% rename from docs/api/use-responsive.md rename to docs/api/use-responsive.zh-CN.md diff --git a/docs/api/use-theme-mode.md b/docs/api/use-theme-mode.zh-CN.md similarity index 100% rename from docs/api/use-theme-mode.md rename to docs/api/use-theme-mode.zh-CN.md diff --git a/docs/api/use-theme.md b/docs/api/use-theme.zh-CN.md similarity index 100% rename from docs/api/use-theme.md rename to docs/api/use-theme.zh-CN.md diff --git a/docs/best-practice/antd-based-components.md b/docs/best-practice/antd-based-components.zh-CN.md similarity index 100% rename from docs/best-practice/antd-based-components.md rename to docs/best-practice/antd-based-components.zh-CN.md diff --git a/docs/best-practice/antd-override.md b/docs/best-practice/antd-override.zh-CN.md similarity index 100% rename from docs/best-practice/antd-override.md rename to docs/best-practice/antd-override.zh-CN.md diff --git a/docs/best-practice/clay.md b/docs/best-practice/clay.zh-CN.md similarity index 100% rename from docs/best-practice/clay.md rename to docs/best-practice/clay.zh-CN.md diff --git a/docs/best-practice/custom-token-types.md b/docs/best-practice/custom-token-types.zh-CN.md similarity index 100% rename from docs/best-practice/custom-token-types.md rename to docs/best-practice/custom-token-types.zh-CN.md diff --git a/docs/best-practice/fix-switch-theme-fouc.md b/docs/best-practice/fix-switch-theme-fouc.zh-CN.md similarity index 100% rename from docs/best-practice/fix-switch-theme-fouc.md rename to docs/best-practice/fix-switch-theme-fouc.zh-CN.md diff --git a/docs/best-practice/index.md b/docs/best-practice/index.zh-CN.md similarity index 100% rename from docs/best-practice/index.md rename to docs/best-practice/index.zh-CN.md diff --git a/docs/best-practice/mac-select.md b/docs/best-practice/mac-select.zh-CN.md similarity index 100% rename from docs/best-practice/mac-select.md rename to docs/best-practice/mac-select.zh-CN.md diff --git a/docs/best-practice/mirgration-less-global-style.md b/docs/best-practice/mirgration-less-global-style.zh-CN.md similarity index 100% rename from docs/best-practice/mirgration-less-global-style.md rename to docs/best-practice/mirgration-less-global-style.zh-CN.md diff --git a/docs/best-practice/nest-element-style.md b/docs/best-practice/nest-element-style.zh-CN.md similarity index 100% rename from docs/best-practice/nest-element-style.md rename to docs/best-practice/nest-element-style.zh-CN.md diff --git a/docs/best-practice/static-message.md b/docs/best-practice/static-message.zh-CN.md similarity index 100% rename from docs/best-practice/static-message.md rename to docs/best-practice/static-message.zh-CN.md diff --git a/docs/best-practice/styled.md b/docs/best-practice/styled.zh-CN.md similarity index 100% rename from docs/best-practice/styled.md rename to docs/best-practice/styled.zh-CN.md diff --git a/docs/changelog.md b/docs/changelog.zh-CN.md similarity index 100% rename from docs/changelog.md rename to docs/changelog.zh-CN.md diff --git a/docs/guide/babel-plugin.md b/docs/guide/babel-plugin.zh-CN.md similarity index 100% rename from docs/guide/babel-plugin.md rename to docs/guide/babel-plugin.zh-CN.md diff --git a/docs/guide/compare.md b/docs/guide/compare.zh-CN.md similarity index 100% rename from docs/guide/compare.md rename to docs/guide/compare.zh-CN.md diff --git a/docs/guide/components-usage.md b/docs/guide/components-usage.zh-CN.md similarity index 100% rename from docs/guide/components-usage.md rename to docs/guide/components-usage.zh-CN.md diff --git a/docs/guide/create-styles.md b/docs/guide/create-styles.zh-CN.md similarity index 100% rename from docs/guide/create-styles.md rename to docs/guide/create-styles.zh-CN.md diff --git a/docs/guide/css-in-js-intro.md b/docs/guide/css-in-js-intro.zh-CN.md similarity index 100% rename from docs/guide/css-in-js-intro.md rename to docs/guide/css-in-js-intro.zh-CN.md diff --git a/docs/guide/cssinjs-compiler-difference.md b/docs/guide/cssinjs-compiler-difference.zh-CN.md similarity index 100% rename from docs/guide/cssinjs-compiler-difference.md rename to docs/guide/cssinjs-compiler-difference.zh-CN.md diff --git a/docs/guide/custom-theme.md b/docs/guide/custom-theme.zh-CN.md similarity index 100% rename from docs/guide/custom-theme.md rename to docs/guide/custom-theme.zh-CN.md diff --git a/docs/guide/index.md b/docs/guide/index.zh-CN.md similarity index 100% rename from docs/guide/index.md rename to docs/guide/index.zh-CN.md diff --git a/docs/guide/migrate-less-application.md b/docs/guide/migrate-less-application.zh-CN.md similarity index 100% rename from docs/guide/migrate-less-application.md rename to docs/guide/migrate-less-application.zh-CN.md diff --git a/docs/guide/migrate-less-codemod.md b/docs/guide/migrate-less-codemod.zh-CN.md similarity index 100% rename from docs/guide/migrate-less-codemod.md rename to docs/guide/migrate-less-codemod.zh-CN.md diff --git a/docs/guide/migrate-less-component.md b/docs/guide/migrate-less-component.zh-CN.md similarity index 100% rename from docs/guide/migrate-less-component.md rename to docs/guide/migrate-less-component.zh-CN.md diff --git a/docs/guide/performance-comparsion.md b/docs/guide/performance-comparsion.zh-CN.md similarity index 100% rename from docs/guide/performance-comparsion.md rename to docs/guide/performance-comparsion.zh-CN.md diff --git a/docs/guide/ssr.md b/docs/guide/ssr.zh-CN.md similarity index 100% rename from docs/guide/ssr.md rename to docs/guide/ssr.zh-CN.md diff --git a/docs/guide/strategy.md b/docs/guide/strategy.zh-CN.md similarity index 100% rename from docs/guide/strategy.md rename to docs/guide/strategy.zh-CN.md diff --git a/docs/guide/styled.md b/docs/guide/styled.zh-CN.md similarity index 100% rename from docs/guide/styled.md rename to docs/guide/styled.zh-CN.md diff --git a/docs/guide/stylish.md b/docs/guide/stylish.zh-CN.md similarity index 100% rename from docs/guide/stylish.md rename to docs/guide/stylish.zh-CN.md diff --git a/docs/guide/switch-theme.md b/docs/guide/switch-theme.zh-CN.md similarity index 100% rename from docs/guide/switch-theme.md rename to docs/guide/switch-theme.zh-CN.md diff --git a/docs/index.md b/docs/index.zh-CN.md similarity index 100% rename from docs/index.md rename to docs/index.zh-CN.md diff --git a/package.json b/package.json index 5a8f3168..18fc395d 100644 --- a/package.json +++ b/package.json @@ -130,6 +130,7 @@ "three": "^0.148", "ts-node": "^10", "typescript": "^5", + "vite": "^4", "vitest": "latest", "zustand": "^4" }, diff --git a/tsconfig.json b/tsconfig.json index fa355b67..e3cf9849 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "include": ["src", ".dumi/**/*", ".dumirc.ts", "*.ts"], + "include": ["src", ".dumirc.ts", "*.ts"], "compilerOptions": { "strict": true, "declaration": true,