1
0
Fork 0

construction: Replaced create with Design constructor

This commit is contained in:
Joost De Cock 2019-02-16 11:26:31 +01:00
parent f68a01988a
commit 0b29eb86ea
4 changed files with 306 additions and 516 deletions

File diff suppressed because it is too large Load diff

View file

@ -48,10 +48,10 @@
}, },
"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.3.3",
"@freesewing/antman": "0.3.0", "@freesewing/antman": "0.3.0",
"@freesewing/models": "0.7.1", "@freesewing/models": "0.7.1",
"@freesewing/plugin-debug": "0.5.2", "@freesewing/plugin-debug": "0.5.2",
@ -60,7 +60,7 @@
"@freesewing/plugin-theme": "0.18.4", "@freesewing/plugin-theme": "0.18.4",
"@freesewing/plugin-validate": "0.4.1", "@freesewing/plugin-validate": "0.4.1",
"husky": "1.3.1", "husky": "1.3.1",
"lint-staged": "8.1.3", "lint-staged": "8.1.4",
"prettier": "1.16.4", "prettier": "1.16.4",
"rimraf": "2.6.3", "rimraf": "2.6.3",
"rollup": "1.1.2", "rollup": "1.1.2",

View file

@ -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: {

View file

@ -11,10 +11,10 @@ import draftPanel4 from "./panel4";
import draftPanel5 from "./panel5"; import draftPanel5 from "./panel5";
import draftPanel6 from "./panel6"; import draftPanel6 from "./panel6";
// Create pattern // Create design
const Cathrin = freesewing.create(config, plugins); const Cathrin = new freesewing.Design(config, plugins);
// Attach per-part draft methods to prototype // Attach draft methods to prototype
Cathrin.prototype.draftBase = draftBase; Cathrin.prototype.draftBase = draftBase;
Cathrin.prototype.draftPanels = draftPanels; Cathrin.prototype.draftPanels = draftPanels;
Cathrin.prototype.draftPanel1 = draftPanel1; Cathrin.prototype.draftPanel1 = draftPanel1;