fix(core): Use default import for JSON
This commit is contained in:
parent
54def5e898
commit
c13b063bb5
3 changed files with 6 additions and 6 deletions
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue