From ac0ae2bee6b64c63518ae7fc5194c183c003fb65 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Thu, 5 May 2022 08:49:38 +0200 Subject: [PATCH] fix(examples): Added plugin-notches example. Closes #2163 --- markdown/dev/reference/plugins/notches/en.md | 4 ++-- packages/examples/config/index.js | 1 + packages/examples/src/index.js | 2 ++ packages/examples/src/plugin_notches.js | 10 ++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 packages/examples/src/plugin_notches.js diff --git a/markdown/dev/reference/plugins/notches/en.md b/markdown/dev/reference/plugins/notches/en.md index 44a29779d77..da7a18d0a43 100644 --- a/markdown/dev/reference/plugins/notches/en.md +++ b/markdown/dev/reference/plugins/notches/en.md @@ -2,13 +2,13 @@ title: "@freesewing/plugin-notches" --- -The **@freesewing/plugin-notces** plugin provides the following [snippets](/reference/api/snippets): +The **@freesewing/plugin-notches** plugin provides the following [snippets](/reference/api/snippets): - [notch](/reference/api/snippets/notch) - [bnotch](/reference/api/snippets/bnotch) -An example of the button, buttonhole, buttonhole-start, buttonhole-end, snap-stud, and snap-socket snippets +An example of the notch and bnotch snippets diff --git a/packages/examples/config/index.js b/packages/examples/config/index.js index 8a786ef6693..b9d5205252d 100644 --- a/packages/examples/config/index.js +++ b/packages/examples/config/index.js @@ -54,6 +54,7 @@ export default { 'plugin_grainline', 'plugin_logo', 'plugin_mirror', + 'plugin_notches', 'plugin_round', 'plugin_scalebox', 'plugin_sprinkle', diff --git a/packages/examples/src/index.js b/packages/examples/src/index.js index 3bdfa2af32a..d9e57759796 100644 --- a/packages/examples/src/index.js +++ b/packages/examples/src/index.js @@ -41,6 +41,7 @@ import draftPlugin_gore from './plugin_gore' import draftPlugin_grainline from './plugin_grainline' import draftPlugin_logo from './plugin_logo' import draftPlugin_mirror from './plugin_mirror' +import draftPlugin_notches from './plugin_notches' import draftPlugin_round from './plugin_round' import draftPlugin_sprinkle from './plugin_sprinkle' import draftPlugin_scalebox from './plugin_scalebox' @@ -138,6 +139,7 @@ let methods = { draftPlugin_grainline, draftPlugin_logo, draftPlugin_mirror, + draftPlugin_notches, draftPlugin_round, draftPlugin_scalebox, draftPlugin_sprinkle, diff --git a/packages/examples/src/plugin_notches.js b/packages/examples/src/plugin_notches.js new file mode 100644 index 00000000000..995e8facfdf --- /dev/null +++ b/packages/examples/src/plugin_notches.js @@ -0,0 +1,10 @@ +import { box } from './shared' + +export default (part) => { + let { Point, snippets, Snippet } = part.shorthand() + + snippets.notch = new Snippet('notch', new Point(60, 10)) + snippets.bnotch = new Snippet('bnotch', new Point(80, 10)) + + return box(part, 140, 20) +}