chore(plugin-title): Avoid style import
This commit is contained in:
parent
81293ad7d1
commit
b62a63d09d
5 changed files with 22 additions and 29 deletions
|
@ -1,6 +1,27 @@
|
|||
import style from './lib/style'
|
||||
import pkg from '../package.json'
|
||||
|
||||
const style = `
|
||||
text.title-nr {
|
||||
font-size: 24pt;
|
||||
font-weight: 700;
|
||||
text-anchor: middle;
|
||||
dominant-baseline: reset-size;
|
||||
}
|
||||
text.title-name {
|
||||
font-size: 7pt;
|
||||
font-weight: 500;
|
||||
text-anchor: middle;
|
||||
dominant-baseline: reset-size;
|
||||
}
|
||||
text.title-pattern {
|
||||
font-size: 4pt;
|
||||
font-weight: 500;
|
||||
dominant-baseline: reset-size;
|
||||
text-anchor: middle;
|
||||
font-style: italic;
|
||||
}
|
||||
`
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
version: pkg.version,
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
text.title-nr {
|
||||
font-size: 24pt;
|
||||
font-weight: 700;
|
||||
text-anchor: middle;
|
||||
dominant-baseline: reset-size;
|
||||
}
|
||||
text.title-name {
|
||||
font-size: 7pt;
|
||||
font-weight: 500;
|
||||
text-anchor: middle;
|
||||
dominant-baseline: reset-size;
|
||||
}
|
||||
text.title-pattern {
|
||||
font-size: 4pt;
|
||||
font-weight: 500;
|
||||
dominant-baseline: reset-size;
|
||||
text-anchor: middle;
|
||||
font-style: italic;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
export default `text.title-nr{font-size:24pt;font-weight:700;text-anchor:middle;dominant-baseline:reset-size}text.title-name{font-size:7pt;font-weight:500;text-anchor:middle;dominant-baseline:reset-size}text.title-pattern{font-size:4pt;font-weight:500;dominant-baseline:reset-size;text-anchor:middle;font-style:italic}`;
|
1
plugins/plugin-title/src/lib/style.min.css
vendored
1
plugins/plugin-title/src/lib/style.min.css
vendored
|
@ -1 +0,0 @@
|
|||
text.title-nr{font-size:24pt;font-weight:700;text-anchor:middle;dominant-baseline:reset-size}text.title-name{font-size:7pt;font-weight:500;text-anchor:middle;dominant-baseline:reset-size}text.title-pattern{font-size:4pt;font-weight:500;dominant-baseline:reset-size;text-anchor:middle;font-style:italic}
|
|
@ -1,7 +1,6 @@
|
|||
import chai from 'chai'
|
||||
import freesewing from '@freesewing/core'
|
||||
import plugin from '../dist/index.mjs'
|
||||
import style from '../src/lib/style.js'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
@ -9,12 +8,6 @@ describe('Title Plugin Tests', () => {
|
|||
const pattern = new freesewing.Pattern().use(plugin)
|
||||
pattern.draft().render()
|
||||
|
||||
it("Should import the style", () => {
|
||||
const patternStyle = pattern.svg.style.toString();
|
||||
const pluginStyle = style.default;
|
||||
expect(patternStyle).to.equal(pluginStyle);
|
||||
});
|
||||
|
||||
it("Should run the title macro", () => {
|
||||
let pattern = new freesewing.Pattern({ name: "testPattern", version: 99 });
|
||||
pattern.draft = function() {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue