wip(core): Support for 2022 style Design constructor
This is the first commit to tackle some exploratory work in the context of discussion #2538 that deals with a number of things, such as: - Making it easier to attach parts to designs - Making it easier to attach parts at run-time - Simplify part inheritance into other designs - Find ways to handle dependenices across designs - Find ways to keep the part-specific config with the part In this initial commit, I've update the Design constructor to handle two different ways of calling it: - legacy: new Design(config, plugins, conditionalPlugins) - 2022: new Design(config) I didn't want to call this the `new` way because that doesn't age well, so I went with `legacy` and `2022` and this is how I will refer to them from now on. This is very much a work in progress and while I will create a PR to keep on eye on the tests, I don't expect to merge this as-is.
This commit is contained in:
parent
6e2a0a33d9
commit
ac9b616b99
4 changed files with 207 additions and 27 deletions
|
@ -19,6 +19,7 @@ it("Pattern constructor should initialize object", () => {
|
|||
expect(pattern.settings.options.percentage).to.equal(0.3);
|
||||
});
|
||||
|
||||
|
||||
it("Should load percentage options", () => {
|
||||
let pattern = new freesewing.Pattern({
|
||||
options: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue