diff --git a/package-lock.json b/package-lock.json index 9d378c84f13..f21d776582c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "freesewing", - "version": "0.24.0", + "version": "0.25.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 294fede6448..20dc95acb1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "freesewing", - "version": "0.24.0", + "version": "0.25.0", "description": "A library for creating made-to-measure sewing patterns", "author": "Joost De Cock (https://github.com/joostdecock)", "homepage": "https://freesewing.org/", diff --git a/src/pattern.js b/src/pattern.js index 5740415f0ae..f277f149ae8 100644 --- a/src/pattern.js +++ b/src/pattern.js @@ -333,7 +333,7 @@ Pattern.prototype.on = function(hook, method, data) { this.hooks[hook].push({ method, data }); }; -Pattern.prototype.with = function(plugin, data = false) { +Pattern.prototype.use = function(plugin, data = false) { this.debug({ type: "success", label: "🔌 Plugin loaded", diff --git a/tests/part.test.js b/tests/part.test.js index 79bf4a6f836..9ca0a08f5e0 100644 --- a/tests/part.test.js +++ b/tests/part.test.js @@ -39,7 +39,7 @@ it("Should register and run a macro", () => { } } }; - pattern.with(plugin); + pattern.use(plugin); let part = new pattern.Part(); let macro = part.macroClosure(); macro("test", { x: 123, y: 456 }); diff --git a/tests/pattern.test.js b/tests/pattern.test.js index 486525af0c5..2bb41fdd387 100644 --- a/tests/pattern.test.js +++ b/tests/pattern.test.js @@ -284,7 +284,7 @@ it("Should register a hook from a plugin", () => { } } }; - pattern.with(plugin); + pattern.use(plugin); pattern.draft(); expect(count).to.equal(1); }); @@ -307,7 +307,7 @@ it("Should register multiple methods on a single hook", () => { ] } }; - pattern.with(plugin); + pattern.use(plugin); pattern.draft(); expect(count).to.equal(2); });