From 683e35973347714b662b0ec018cb98023ef3b496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?w=C5=AB=20y=C4=81ng?= Date: Tue, 12 Nov 2024 22:19:07 +0800 Subject: [PATCH] feat(icons): new version (#3194) * feat(icons): new version * chore: fix build * chore: fix build --- package.json | 8 ++++---- site/pwaConfig.js | 12 ++++++------ src/icon/icon.en-US.md | 6 ++++-- src/icon/icon.md | 6 ++++-- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index ff9504f446..ba08aa1537 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "lint:tsc": "tsc -p ./tsconfig.dev.json ", "generate:usage": "node script/generate-usage/index.js", "generate:coverage-badge": "npm run test:coverage && node script/generate-coverage.js", - "generate:jsx-demo":"npx babel src/**/_example --extensions '.tsx' --config-file ./babel.config.demo.js --relative --out-dir ../_example-js --out-file-extension=.jsx", + "generate:jsx-demo": "npx babel src/**/_example --extensions '.tsx' --config-file ./babel.config.demo.js --relative --out-dir ../_example-js --out-file-extension=.jsx", "format:jsx-demo": "npx eslint src/**/_example-js/*.jsx --fix && npx prettier --write src/**/_example-js/*.jsx", "test": "vitest run && npm run test:snap", "test:ui": "vitest --ui", @@ -61,7 +61,7 @@ "build:tsc-esm": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir esm/", "build:tsc-cjs": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir cjs/", "build:tsc-lib": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir lib/", - "build:jsx-demo":"npm run generate:jsx-demo && npm run format:jsx-demo", + "build:jsx-demo": "npm run generate:jsx-demo && npm run format:jsx-demo", "changelog": "node script/generate-changelog.js", "init:component": "node script/init-component", "robot": "publish-cli robot-msg", @@ -133,8 +133,8 @@ "@typescript-eslint/eslint-plugin": "^5.13.0", "@typescript-eslint/parser": "^5.13.0", "@vitejs/plugin-react": "^4.3.1", - "@vitest/coverage-v8": "^2.1.1", "@vitest/coverage-istanbul": "^2.1.1", + "@vitest/coverage-v8": "^2.1.1", "@vitest/ui": "^2.1.1", "autoprefixer": "^10.4.0", "babel-polyfill": "^6.26.0", @@ -185,7 +185,7 @@ "rollup-plugin-typescript2": "^0.31.2", "standard-changelog": "^2.0.27", "start-server-and-test": "^1.14.0", - "tdesign-icons-view": "^0.2.0", + "tdesign-icons-view": "^0.3.0", "tdesign-publish-cli": "^0.0.12", "tdesign-site-components": "^0.15.3", "tdesign-theme-generator": "^1.0.0", diff --git a/site/pwaConfig.js b/site/pwaConfig.js index 60ca8f17d5..5ea8e0d6cc 100644 --- a/site/pwaConfig.js +++ b/site/pwaConfig.js @@ -1,9 +1,9 @@ export default { strategies: 'injectManifest', - includeAssets: ['favicon.svg', 'favicon.ico', 'apple-touch-icon.png'], + includeAssets: ['favicon.svg', 'favicon.ico', 'apple-touch-icon.png'], injectManifest: { - maximumFileSizeToCacheInBytes: 5000000 - }, + maximumFileSizeToCacheInBytes: 7000000, + }, manifest: { name: 'TDesign for React', short_name: 'TDesign', @@ -19,7 +19,7 @@ export default { src: 'pwa-512x512.png', sizes: '512x512', type: 'image/png', - } - ] - } + }, + ], + }, }; diff --git a/src/icon/icon.en-US.md b/src/icon/icon.en-US.md index e46e286a35..17634db534 100644 --- a/src/icon/icon.en-US.md +++ b/src/icon/icon.en-US.md @@ -70,8 +70,10 @@ if your project is in a no-network scenario, please use on-demand loading of ico -

Most icons were added to the icon library after version 0.3.0. If you find that the icon cannot be displayed normally after being imported, please check the version of tdesign-icons-react you have installed

- +

Most icons were added to the icon library after version 0.4.0. If you find that the icon cannot be displayed normally after being imported, please check the version of tdesign-icons-react you have installed. Supports Chinese and English search. If you think other keyword prompts can be added, feel free to submit a Pull Request to the Icon Repository to help us complete it together. +

+ diff --git a/src/icon/icon.md b/src/icon/icon.md index 16915742c0..967c8b99fb 100644 --- a/src/icon/icon.md +++ b/src/icon/icon.md @@ -3,7 +3,7 @@ ### 安装独立 Icon 包 图标相对其他基础组件较为独立,所以作为一个独立的 `npm` 包做发布管理。如果项目中直接使用,请安装 `tdesign-icons-react`。 -图标库中共包含超过 **25** 类,**1200+** 个图标,推荐您按需引用图标,减少产物的体积。 +图标库中共包含超过 **25** 类,**2100+** 个图标,推荐您按需引用图标,减少产物的体积。 ### 按需引入图标 @@ -83,7 +83,9 @@ -

大部分图标在 0.3.0 版本后的图标库新增,如果发现图标引入后无法正常展示,请检查安装的图标库`tdesign-icons-react`的版本。

+

大部分图标在 0.4.0 版本后的图标库新增,如果发现图标引入后无法正常展示,请检查安装的图标库`tdesign-icons-react`的版本。支持中文英文搜索,如果觉得可以再增加其他关键词提示,欢迎到 图标仓库 提交PR,帮我们一起补充。 +