1
0
Fork 0

fix(core): Use default import for JSON

This commit is contained in:
Joost De Cock 2022-01-25 09:29:09 +01:00
parent 54def5e898
commit c13b063bb5
3 changed files with 6 additions and 6 deletions

View file

@ -4,10 +4,10 @@ import Point from './point'
import Path from './path' import Path from './path'
import Snippet from './snippet' import Snippet from './snippet'
import * as utils from './utils' import * as utils from './utils'
import { version } from '../package.json' import pkg from '../package.json'
export default { export default {
version, version: pkg.version,
Design, Design,
Pattern, Pattern,
Point, Point,

View file

@ -8,7 +8,7 @@ import pack from 'bin-pack'
import Store from './store' import Store from './store'
import Hooks from './hooks' import Hooks from './hooks'
import Attributes from './attributes' import Attributes from './attributes'
import { version } from '../package.json' import pkg from '../package.json'
export default function Pattern(config = { options: {} }) { export default function Pattern(config = { options: {} }) {
// Events store and raise methods // Events store and raise methods
@ -34,7 +34,7 @@ export default function Pattern(config = { options: {} }) {
}, },
} }
this.raise.debug( this.raise.debug(
`New \`@freesewing/${config.name}:${config.version}\` pattern using \`@freesewing/core:${version}\`` `New \`@freesewing/${config.name}:${config.version}\` pattern using \`@freesewing/core:${pkg.version}\``
) )
this.config = config // Pattern configuration this.config = config // Pattern configuration

View file

@ -1,6 +1,6 @@
import Attributes from './attributes' import Attributes from './attributes'
import { round } from './utils' import { round } from './utils'
import { version } from '../package.json' import pkg from '../package.json'
function Svg(pattern) { function Svg(pattern) {
this.openGroups = [] this.openGroups = []
@ -23,7 +23,7 @@ function Svg(pattern) {
this.attributes.add('xmlns:xlink', 'http://www.w3.org/1999/xlink') this.attributes.add('xmlns:xlink', 'http://www.w3.org/1999/xlink')
this.attributes.add('xml:lang', pattern.settings.locale) this.attributes.add('xml:lang', pattern.settings.locale)
this.attributes.add('xmlns:freesewing', 'http://freesewing.org/namespaces/freesewing') this.attributes.add('xmlns:freesewing', 'http://freesewing.org/namespaces/freesewing')
this.attributes.add('freesewing', version) this.attributes.add('freesewing', pkg.version)
} }
Svg.prototype.runHooks = function (hookName, data = false) { Svg.prototype.runHooks = function (hookName, data = false) {