construction: Replaced create with Design constructor
This commit is contained in:
parent
a5007e0e4e
commit
03f09bf048
4 changed files with 10 additions and 10 deletions
|
@ -23,7 +23,7 @@
|
||||||
.use(freesewing.plugins.validate)
|
.use(freesewing.plugins.validate)
|
||||||
;
|
;
|
||||||
|
|
||||||
pattern.settings.only = ['snippet_clone'];
|
//pattern.settings.only = ['snippet_clone'];
|
||||||
pattern.draft();
|
pattern.draft();
|
||||||
document.getElementById("svg").innerHTML = pattern.render();
|
document.getElementById("svg").innerHTML = pattern.render();
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@freesewing/plugin-bundle": "0.7.3",
|
"@freesewing/plugin-bundle": "0.7.3",
|
||||||
"freesewing": "0.29.4"
|
"freesewing": "0.30.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.2.2",
|
"@babel/core": "7.2.2",
|
||||||
|
|
|
@ -16,12 +16,12 @@ export default {
|
||||||
commonjs(),
|
commonjs(),
|
||||||
babel({
|
babel({
|
||||||
exclude: "node_modules/**"
|
exclude: "node_modules/**"
|
||||||
}),
|
|
||||||
terser({
|
|
||||||
output: {
|
|
||||||
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
//terser({
|
||||||
|
// output: {
|
||||||
|
// preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||||
|
// }
|
||||||
|
//})
|
||||||
],
|
],
|
||||||
external: ["freesewing", "@freesewing/plugin-bundle"],
|
external: ["freesewing", "@freesewing/plugin-bundle"],
|
||||||
output: {
|
output: {
|
||||||
|
|
|
@ -66,10 +66,10 @@ import draftSettings_sa from "./settings_sa";
|
||||||
import draftSnippet_attr from "./snippet_attr";
|
import draftSnippet_attr from "./snippet_attr";
|
||||||
import draftSnippet_clone from "./snippet_clone";
|
import draftSnippet_clone from "./snippet_clone";
|
||||||
|
|
||||||
// Create pattern
|
// Create design
|
||||||
const Examples = freesewing.create(config, plugins);
|
const Examples = new freesewing.Design(config, plugins);
|
||||||
|
|
||||||
// Attach per-part draft methods to prototype
|
// Attach draft methods to prototype
|
||||||
Examples.prototype.draftPath_move = draftPath_ops;
|
Examples.prototype.draftPath_move = draftPath_ops;
|
||||||
Examples.prototype.draftPath_line = draftPath_ops;
|
Examples.prototype.draftPath_line = draftPath_ops;
|
||||||
Examples.prototype.draftPath_curve = draftPath_ops;
|
Examples.prototype.draftPath_curve = draftPath_ops;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue