Bläddra i källkod

[icon]Update README

dufu1991 3 år sedan
förälder
incheckning
63b7b78900

+ 7 - 7
packages/rollup-plugin-stdf-icon/README.md

@@ -59,16 +59,16 @@ This configuration will combine two symbols. **When using the STDF Icon componen
 
 Note: **The parameter should be an array** representing the configuration for multiple folders. **Each folder configuration should be an object** with `inFile` as the folder where the SVG files to be combined are located, `outFile` as the output path for the combined SVG symbol file, and `fileName` as the filename of the combined SVG symbol file. Please ensure the correctness and avoid conflicts in paths and filenames.
 
-In general, the use of symbols is to combine a series of small, single-color SVG files into one symbol. This allows for easy modification of attributes such as color, size, and opacity when using SVG in a project. Therefore, when configuring rollup-plugin-stdf-icon, the color attributes of the SVG files themselves are removed. If you need to use multi-color SVG files and want to preserve the colors in the generated symbol, you just need to set the `simple` parameter to `false`.
+In general, the use of symbols is to combine a series of small, single-color SVG files into one symbol. This allows for easy modification of attributes such as color, size, and opacity when using SVG in a project. Therefore, when default configuring rollup-plugin-stdf-icon, the color attributes of the SVG files themselves are removed. If you need to use multi-color SVG files and want to preserve the colors in the generated symbol, you just need to set the `simple` parameter to `false`.
 
 # Configuration
 
-| Parameter | Default         | Description                                                                                                   |
-| --------- | --------------- | ------------------------------------------------------------------------------------------------------------- |
-| inFile    | src/assets/svgs | The folder where all the SVG files to be merged are located.                                                  |
-| outFile   | public/fonts    | The output path for the merged SVG symbol file.                                                               |
-| fileName  | symbol          | The filename of the merged SVG symbol file.                                                                   |
-| simple    | true            | Whether to use the simple mode, the simple mode will remove the color attributes of the SVG files themselves. |
+| Parameter | Default           | Description                                                                                                   |
+| --------- | ----------------- | ------------------------------------------------------------------------------------------------------------- |
+| inFile    | 'src/assets/svgs' | The folder where all the SVG files to be merged are located.                                                  |
+| outFile   | 'public/fonts'    | The output path for the merged SVG symbol file.                                                               |
+| fileName  | 'symbol'          | The filename of the merged SVG symbol file.                                                                   |
+| simple    | true              | Whether to use the simple mode, the simple mode will remove the color attributes of the SVG files themselves. |
 
 # License
 

+ 7 - 7
packages/rollup-plugin-stdf-icon/README_CN.md

@@ -57,16 +57,16 @@ export default defineConfig({
 
 注意:**传入参数为数组**,表示多个文件夹的配置。**每个文件夹的配置为一个对象**,对象中的 inFile 为将要被合并的 SVG 文件所在的文件夹,outFile 为合并后的 SVG symbol 文件的输出路径,fileName 为合并后的 SVG symbol 文件的文件名。请注意路径与文件名的正确性与冲突。
 
-一般来说,使用 symbol 的场景是将一系列小的单色 svg 合并为一个 symbol,可以方便项目使用 svg 时修改颜色、大小、透明度等属性,所以配置下 rollup-plugin-stdf-icon 会去除掉 svg 本身的颜色属性。如果需要使用多色 svg,合成的 symbol 需要保留 svg 本身的颜色,只需要将 `simple` 参数设置为 `false`。
+一般来说,使用 symbol 的场景是将一系列小的单色 svg 合并为一个 symbol,可以方便项目使用 svg 时修改颜色、大小、透明度等属性,所以默认配置下 rollup-plugin-stdf-icon 会去除掉 svg 本身的颜色属性。如果需要使用多色 svg,合成的 symbol 需要保留 svg 本身的颜色,只需要将 `simple` 参数设置为 `false`。
 
 # 配置
 
-| 参数     | 默认            | 描述                                                |
-| -------- | --------------- | --------------------------------------------------- |
-| inFile   | src/assets/svgs | 将要被合并的所有 SVG 文件所在的文件夹。             |
-| outFile  | public/fonts    | 合并后的 SVG symbol 文件的输出路径。                |
-| fileName | symbol          | 合并后的 SVG symbol 文件的文件名。                  |
-| simple   | true            | 是否使用简单模式,简单模式会将 svg 自带的颜色去除。 |
+| 参数     | 默认              | 描述                                                |
+| -------- | ----------------- | --------------------------------------------------- |
+| inFile   | 'src/assets/svgs' | 将要被合并的所有 SVG 文件所在的文件夹。             |
+| outFile  | 'public/fonts'    | 合并后的 SVG symbol 文件的输出路径。                |
+| fileName | 'symbol'          | 合并后的 SVG symbol 文件的文件名。                  |
+| simple   | true              | 是否使用简单模式,简单模式会将 svg 自带的颜色去除。 |
 
 # 许可证
 

+ 1 - 1
packages/rollup-plugin-stdf-icon/package.json

@@ -1,6 +1,6 @@
 {
     "name": "rollup-plugin-stdf-icon",
-    "version": "0.0.4",
+    "version": "0.0.5",
     "description": "A Rollup plugin that combines a series of svg into one symbol for use in the STDF project",
     "main": "dist/index.js",
     "scripts": {