svg-fill:以单一颜色填充SVG的所有形状

时间:2021-02-15 13:06:07
【文件属性】:
文件名称:svg-fill:以单一颜色填充SVG的所有形状
文件大小:126KB
文件格式:ZIP
更新时间:2021-02-15 13:06:07
svg color fill icon build-tool SVG填充 用单色填充所有形状的SVG。 :warning: 当前使用简单的解决方案,该解决方案只是将具有所选填充颜色的填充属性添加到SVG元素。 对于没有样式属性的SVG(例如要组合成符号精灵的属性),这应该可以正常工作。 对于其他任何事情,结果都会是命中注定的。 用法 要求 Node.js> = 10 安装 npm install --save svg-fill API 简单用法: const SvgFill = require ( 'svg-fill' ) ; // Instantiante SvgFill with your chosen fill // color: const svgFill = new SvgFill ( '#FF0000' ) ; // SvgFill expects SVG data as a string or Buffer const originalSvgD
【文件预览】:
svg-fill-master
----.gitignore(1005B)
----svg-fill-illustration.svg(8KB)
----package.json(2KB)
----commitlint.config.js(424B)
----package-lock.json(532KB)
----src()
--------index.test.ts(4KB)
--------index.ts(2KB)
--------__snapshots__()
----.nvmrc(12B)
----jest.config.js(261B)
----CHANGELOG.md(2KB)
----tsconfig.json(452B)
----release.config.js(337B)
----.github()
--------workflows()
--------dependabot.yml(280B)
----.eslintrc.js(260B)
----README.md(3KB)
----.eslintignore(172B)
----test()
--------test-star.svg(2KB)
----.editorconfig(299B)

网友评论