1
0
Fork 0
freesewing/plugins/plugin-svgattr/src/index.mjs

17 lines
363 B
JavaScript
Raw Normal View History

2022-08-28 13:48:04 +02:00
import { name, version } from '../package.json'
export const plugin = {
name,
version,
hooks: {
preRender: function (svg, attributes = {}) {
for (const key of Object.keys(attributes)) svg.attributes.set(key, attributes[key])
},
},
}
// More specifically named exports
export const bannerPlugin = plugin
export const pluginBanner = plugin