1
0
Fork 0

fix(plugin-mirror): Use default import for JSON

This commit is contained in:
Joost De Cock 2022-01-25 09:26:22 +01:00
parent 435b00eb53
commit ebf7c41570

View file

@ -1,4 +1,4 @@
import { name, version } from '../package.json' import pkg from '../package.json'
const lineValues = (start, end) => { const lineValues = (start, end) => {
const { x: x1, y: y1 } = start const { x: x1, y: y1 } = start
@ -22,10 +22,10 @@ const mirrorGen = (start, end) => {
const capFirst = (string) => string.charAt(0).toUpperCase() + string.slice(1) const capFirst = (string) => string.charAt(0).toUpperCase() + string.slice(1)
export default { export default {
name: name, name: pkg.name,
version: version, version: pkg.version,
hooks: { hooks: {
preRender: (svg) => svg.attributes.setIfUnset('freesewing:plugin-mirror', version), preRender: (svg) => svg.attributes.setIfUnset('freesewing:plugin-mirror', pkg.version),
}, },
macros: { macros: {
mirror: function ({ mirror: function ({