Forráskód Böngészése

[icon]Change default inFile

dufu1991 3 éve
szülő
commit
3ac4f4eff6

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

@@ -40,7 +40,7 @@ export default defineConfig({
 })
 ```
 
-During development, simply place the SVG files you need in the specified input folder (default: `src/assets/svgs`). The plugin will automatically combine them into a single SVG symbol file and output it to the specified output folder (default: `public/fonts`). After building with Vite, the files in the public folder will be copied to the dist folder. Therefore, after building, the combined SVG symbol file will be located in the dist/fonts folder. Please refer to the [Vite Asset Handling](https://vitejs.dev/guide/assets.html#the-public-directory) documentation.
+During development, simply place the SVG files you need in the specified input folder (default: `src/assets/icons`). The plugin will automatically combine them into a single SVG symbol file and output it to the specified output folder (default: `public/fonts`). After building with Vite, the files in the public folder will be copied to the dist folder. Therefore, after building, the combined SVG symbol file will be located in the dist/fonts folder. Please refer to the [Vite Asset Handling](https://vitejs.dev/guide/assets.html#the-public-directory) documentation.
 
 Generally, you can simply place the SVG files in the default input folder without the need for additional configuration.
 
@@ -65,7 +65,7 @@ In general, the use of symbols is to combine a series of small, single-color SVG
 
 | Parameter | Default           | Description                                                                                                   |
 | --------- | ----------------- | ------------------------------------------------------------------------------------------------------------- |
-| inFile    | 'src/assets/svgs' | The folder where all the SVG files to be merged are located.                                                  |
+| inFile    | 'src/assets/icons' | 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. |

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

@@ -39,7 +39,7 @@ export default defineConfig({
 })
 ```
 
-开发过程中只需要将用到的 svg 文件放到指定的入口文件夹(默认 `src/assets/svgs`),插件会自动将其合并为一个 SVG symbol 文件,输出到指定的输出文件夹(默认 `public/fonts`)。Vite 构建之后 public 文件夹下的文件会被复制到 dist 文件夹下,所以在构建之后,合并的 SVG symbol 文件会出现在 dist/fonts 文件夹下。请参考 [Vite 配置](https://cn.vitejs.dev/guide/assets.html#the-public-directory)。
+开发过程中只需要将用到的 svg 文件放到指定的入口文件夹(默认 `src/assets/icons`),插件会自动将其合并为一个 SVG symbol 文件,输出到指定的输出文件夹(默认 `public/fonts`)。Vite 构建之后 public 文件夹下的文件会被复制到 dist 文件夹下,所以在构建之后,合并的 SVG symbol 文件会出现在 dist/fonts 文件夹下。请参考 [Vite 配置](https://cn.vitejs.dev/guide/assets.html#the-public-directory)。
 
 一般来说,按照默认配置将 svg 文件放到入口文件夹即可,无需过多配置。
 
@@ -63,7 +63,7 @@ export default defineConfig({
 
 | 参数     | 默认              | 描述                                                |
 | -------- | ----------------- | --------------------------------------------------- |
-| inFile   | 'src/assets/svgs' | 将要被合并的所有 SVG 文件所在的文件夹。             |
+| inFile   | 'src/assets/icons' | 将要被合并的所有 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.5",
+    "version": "0.0.6",
     "description": "A Rollup plugin that combines a series of svg into one symbol for use in the STDF project",
     "main": "dist/index.js",
     "scripts": {

+ 1 - 1
packages/rollup-plugin-stdf-icon/src/index.js

@@ -7,7 +7,7 @@ import svgstore from 'svgstore';
 export default function svgSprite(datas) {
     // 可接收多组参数,处理多个文件夹内的文件
     // Multiple parameters can be accepted to process files in multiple folders
-    const data = datas ? datas : [{ inFile: 'src/assets/svgs', outFile: 'public/fonts', fileName: 'symbol', simple: true }];
+    const data = datas ? datas : [{ inFile: 'src/assets/icons', outFile: 'public/fonts', fileName: 'symbol', simple: true }];
 
     // 循环处理每一组参数
     // Loop through each set of parameters