chore(markdown): Updated Plugin docs for v3
This commit is contained in:
parent
0374b04a59
commit
d988f11062
24 changed files with 329 additions and 606 deletions
|
@ -1,20 +1,10 @@
|
|||
---
|
||||
title: "@freesewing/plugin-banner"
|
||||
title: plugin-banner
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-banner** plugin provides
|
||||
[the banner macro](/reference/api/macros/banner).
|
||||
This macro allows you to add repeating text along a path.
|
||||
|
||||
## Example
|
||||
|
||||
<Example part="plugin_banner">Example of the banner macro provided by this plugin</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The banner plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-banner][1], this plugin provides [the banner
|
||||
macro](/reference/api/macros/banner) which allows you to add repeating text
|
||||
along a path.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -24,16 +14,13 @@ npm install @freesewing/plugin-banner
|
|||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import banner from "@freesewing/plugin-banner";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, banner);
|
||||
```
|
||||
The banner plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-banner
|
||||
|
||||
Now you can use the
|
||||
[banner](/reference/api/macros/banner/) macros in your parts.
|
||||
|
|
|
@ -1,21 +1,13 @@
|
|||
---
|
||||
title: "@freesewing/plugin-bartack"
|
||||
title: plugin-bartack
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-bartack** plugin provides
|
||||
[the bartack macro](/reference/api/macros/bartack).
|
||||
This macro allows you to add bartacks — a set of
|
||||
tight zig-zag stitches used to enforce a seam — to your design.
|
||||
|
||||
## Example
|
||||
|
||||
<Example part="plugin_bartack">Example of the bartack macro provided by this plugin</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The bartack plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-bartack][1], this plugin provides
|
||||
the [bartack](/reference/api/macros/bartack),
|
||||
[bartackAlong](/reference/api/macros/bartackalong), and
|
||||
the [bartackFractionAlong](/reference/api/macros/bartack) macros
|
||||
which allows you to add bartacks — a set
|
||||
of tight zig-zag stitches used to enforce a seam — to your design.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -25,18 +17,13 @@ npm install @freesewing/plugin-bartack
|
|||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import bartack from "@freesewing/plugin-bartack";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, bartack);
|
||||
```
|
||||
The bartack plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-bartack
|
||||
|
||||
Now you can use the
|
||||
[bartack](/reference/api/macros/bartack/),
|
||||
[bartackAlong](/reference/api/macros/bartackalong/), and
|
||||
[bartackFractionAlong](/reference/api/macros/bartackfractionalong/) macros in your parts.
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
---
|
||||
title: "@freesewing/plugin-bundle"
|
||||
title: plugin-bundle
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-bundle** plugin bundles the most common FreeSewing build-time plugins:
|
||||
Published as [@freesewing/plugin-bundle][1], this plugin bundles the most
|
||||
commonly used FreeSewing time plugins in one handy package.
|
||||
|
||||
Specifically, loading this plugin will have the same effect as loading these
|
||||
plugins individually:
|
||||
|
||||
- [plugin-banner](/reference/plugins/banner) : Add repeating text to your patterns
|
||||
- [plugin-bartack](/reference/plugins/bartack) : Add bartacks to your patterns
|
||||
|
@ -19,8 +23,6 @@ The **@freesewing/plugin-bundle** plugin bundles the most common FreeSewing buil
|
|||
- [plugin-sprinkle](/reference/plugins/sprinkle) : Add multiple snippets to your patterns
|
||||
- [plugin-title](/reference/plugins/title) : Add pretty titles to your pattern parts
|
||||
|
||||
Almost all patterns use these plugins, so it made sense to bundle them.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
|
@ -29,13 +31,7 @@ npm install @freesewing/plugin-bundle
|
|||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import plugins from "@freesewing/plugin-bundle";
|
||||
import config from "../config";
|
||||
|
||||
const Pattern = new freesewing.Design(config, plugins);
|
||||
```
|
||||
|
|
|
@ -1,62 +1,12 @@
|
|||
---
|
||||
title: "@freesewing/plugin-bust"
|
||||
title: plugin-bust
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-bust** plugin helps you adapt menswear patterns for breasts.
|
||||
If you are designing a womenswear pattern, you won't need this plugin. But if you're adapting
|
||||
a menswear pattern for breasts, or merely want to accomodate both people with and without
|
||||
breasts, this plugin can help you accomplish that.
|
||||
|
||||
<Note>
|
||||
|
||||
##### Understanding the use-case for this plugin
|
||||
|
||||
Almost all menswear patterns use the chest circumference to draft the garment.
|
||||
|
||||
As a person with breasts, using your (full) chest circumference will give you bad fit.
|
||||
Instead, it's better to use your high bust measurement as chest circumference, and then create extra room for the breasts.
|
||||
|
||||
This is the same technique that's used in a full-bust adjustment to fit a womenswear pattern for a person with above-average sized breasts.
|
||||
|
||||
This plugin helps you by:
|
||||
|
||||
- Storing the chest circumference in `measurements.bust`
|
||||
- Changing `measurments.chestCircumference` to the value of `measurements.highBust`
|
||||
|
||||
</Note>
|
||||
|
||||
## Use when extending breastless patterns into a with-breasts version
|
||||
|
||||
One way this plugin is used is to extend a menswear pattern into a womenswear pattern.
|
||||
In this case, the plugin will always be loaded since the pattern assumes breasts will be present.
|
||||
|
||||
This way you can extend a menswear pattern and have it drafted with the high bust measurement
|
||||
as chest measurment, after which you can create room for the breasts.
|
||||
|
||||
You can see this in practice in our [Carlita][1] pattern,
|
||||
which extends the menswear [Carlton][2] pattern.
|
||||
|
||||
<Tip>
|
||||
|
||||
To learn more about extending a pattern, see [Design inheritance](/howtos/code/inheritance/)
|
||||
|
||||
</Tip>
|
||||
|
||||
## Use when creating gender-neutral patterns
|
||||
|
||||
To create a truly gender-neutral pattern — one that will adapt to breasts only if they are
|
||||
present — you can use this plugin, but you'll also need a few other things:
|
||||
|
||||
- You'll need to mark the breast measurements as [optional measurements](/reference/api/config/optionalmeasurements)
|
||||
- You'll need to [conditionally load this plugin](/guides/plugins/conditionally-loading-build-time-plugins)
|
||||
|
||||
You can see an example of this in [our Teagan design][3].
|
||||
|
||||
<Fixme>
|
||||
|
||||
**TODO**: Write a tutorial on gender-neutral desing
|
||||
|
||||
</Fixme>
|
||||
Published as [@freesewing/plugin-bust][1], this plugin helps you adapt menswear
|
||||
patterns for people with breasts. If you are designing a womenswear pattern,
|
||||
you won't need this plugin. But if you're adapting a menswear pattern for
|
||||
breasts, or merely want to accomodate both people with and without breasts,
|
||||
this plugin can help you accomplish that.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -66,19 +16,66 @@ npm install @freesewing/plugin-bust
|
|||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import bust from "@freesewing/plugin-bust";
|
||||
import config from "../config";
|
||||
|
||||
const Pattern = new freesewing.Design(config, bust);
|
||||
```
|
||||
## Notes
|
||||
|
||||
[1]: https://github.com/freesewing/freesewing/blob/develop/designs/carlita/src/index.js#L12
|
||||
### Understanding the use-case for this plugin
|
||||
|
||||
[2]: https://github.com/freesewing/freesewing/blob/develop/designs/carlton
|
||||
Almost all menswear patterns use the chest circumference to draft the garment.
|
||||
|
||||
As a person with breasts, using your (full) chest circumference will give you
|
||||
bad fit. Instead, it's better to use your high bust measurement as chest
|
||||
circumference, and then create extra room for the breasts.
|
||||
|
||||
This is the same technique that's used in a full-bust adjustment to fit a
|
||||
womenswear pattern for a person with above-average sized breasts.
|
||||
|
||||
This plugin helps you by:
|
||||
|
||||
- Storing the chest circumference in `measurements.bust`
|
||||
- Changing `measurments.chestCircumference` to the value of
|
||||
`measurements.highBust`
|
||||
|
||||
### Use when extending breastless patterns into a with-breasts version
|
||||
|
||||
One way this plugin is used is to extend a menswear pattern into a womenswear
|
||||
pattern. In this case, the plugin will always be loaded since the pattern
|
||||
assumes breasts will be present.
|
||||
|
||||
This way you can extend a menswear pattern and have it drafted with the high
|
||||
bust measurement as chest measurment, after which you can create room for the
|
||||
breasts.
|
||||
|
||||
You can see this in practice in our [Carlita][2] pattern, which extends the
|
||||
menswear [Carlton][3] pattern.
|
||||
|
||||
<Related compact>
|
||||
To learn more about extending a pattern, see [Design
|
||||
inheritance](/howtos/code/inheritance/)
|
||||
</Related>
|
||||
|
||||
### Use when creating gender-neutral patterns
|
||||
|
||||
To create a truly gender-neutral pattern — one that will adapt to breasts only
|
||||
if they are present — you can use this plugin, but you'll also need a few other
|
||||
things:
|
||||
|
||||
- You'll need to mark the breast measurements as [optional
|
||||
measurements](/reference/api/config/optionalmeasurements)
|
||||
- You'll need to [conditionally load this
|
||||
plugin](/guides/plugins/conditionally-loading-build-time-plugins)
|
||||
|
||||
You can see an example of this in [our Teagan design][4].
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-banner
|
||||
|
||||
[2]: https://github.com/freesewing/freesewing/blob/develop/designs/carlita/src/index.js#L12
|
||||
|
||||
[3]: https://github.com/freesewing/freesewing/blob/develop/designs/carlton
|
||||
|
||||
[4]: https://github.com/freesewing/freesewing/blob/develop/designs/teagan/src/index.js
|
||||
|
||||
[3]: https://github.com/freesewing/freesewing/blob/develop/designs/teagan/src/index.js
|
||||
|
|
|
@ -1,50 +1,32 @@
|
|||
---
|
||||
title: "@freesewing/plugin-buttons"
|
||||
title: plugin-buttons
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-buttons** plugin provides the following [snippets](/reference/api/snippets):
|
||||
Published as [@freesewing/plugin-buttons][1], this plugin provides the following
|
||||
[snippets](/reference/snippets):
|
||||
|
||||
- [button](/reference/api/snippets/button)
|
||||
- [buttonhole](/reference/api/snippets/buttonhole)
|
||||
- [buttonhole-start](/reference/api/snippets/buttonhole-start)
|
||||
- [buttonhole-end](/reference/api/snippets/buttonhole-end)
|
||||
- [snap-stud](/reference/api/snippets/snap-stud)
|
||||
- [snap-socket](/reference/api/snippets/snap-socket)
|
||||
|
||||
<Example part="plugin_buttons">
|
||||
An example of the button, buttonhole, buttonhole-start, buttonhole-end, snap-stud, and snap-socket snippets
|
||||
</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The buttons plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
- [button](/reference/snippets/button)
|
||||
- [buttonhole](/reference/snippets/buttonhole)
|
||||
- [buttonhole-start](/reference/snippets/buttonhole-start)
|
||||
- [buttonhole-end](/reference/snippets/buttonhole-end)
|
||||
- [snap-stud](/reference/snippets/snap-stud)
|
||||
- [snap-socket](/reference/snippets/snap-socket)
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-buttons
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import buttons from "@freesewing/plugin-buttons";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, buttons);
|
||||
```
|
||||
The buttons plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-buttons
|
||||
|
||||
Now you can use the
|
||||
[button](/reference/api/snippets/button),
|
||||
[buttonhole](/reference/api/snippets/buttonhole),
|
||||
[buttonhole-start](/reference/api/snippets/buttonhole-start),
|
||||
[buttonhole-end](/reference/api/snippets/buttonhole-end),
|
||||
[snap-stud](/reference/api/snippets/snap-stud), and
|
||||
[snap-socket](/reference/api/snippets/snap-socket)
|
||||
snippets in your designs.
|
||||
|
|
|
@ -1,40 +1,26 @@
|
|||
---
|
||||
title: "@freesewing/plugin-cutonfold"
|
||||
title: plugin-cutonfold
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-cutonfold** plugin provides
|
||||
[the cutonfold macro](/reference/api/macros/cutonfold) which adds a cut-on-fold
|
||||
Published as [@freesewing/plugin-cutonfold][1], this plugin provides [the
|
||||
cutonfold macro](/reference/api/macros/cutonfold) which adds a cut-on-fold
|
||||
indicator to your design.
|
||||
|
||||
<Example part="plugin_cutonfold">
|
||||
|
||||
An example of the cutonfold macro
|
||||
|
||||
</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The cutonfold plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-cutonfold
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import cutonfold from "@freesewing/plugin-cutonfold";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, cutonfold);
|
||||
```
|
||||
The cutonfold plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-cutonfold
|
||||
|
||||
Now you can use [the cutonfold macro](/reference/api/macros/cutonfold/) in your parts.
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
---
|
||||
title: "@freesewing/plugin-dimension"
|
||||
title: plugin-dimension
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-dimension** plugin provides a variety of macros
|
||||
to facilitate adding _dimensions_ to your design. By _dimensions_ we mean
|
||||
the indicators for distance that are added to patterns
|
||||
in [paperless mode](/reference/api/settings/paperless).
|
||||
|
||||
The following macors are provided by this plugin:
|
||||
Published as [@freesewing/plugin-dimension][1], this plugin provides the
|
||||
following macros:
|
||||
|
||||
- [hd](/reference/api/macros/hd) : Adds a horizontal dimension
|
||||
- [vd](/reference/api/macros/vd) : Adds a vertical dimension
|
||||
|
@ -16,42 +12,21 @@ The following macors are provided by this plugin:
|
|||
- [rmd](/reference/api/macros/rmd) : Removes a dimension
|
||||
- [rmad](/reference/api/macros/rmad) : Removes all dimensions with a default prefix
|
||||
|
||||
<Example part="plugin_dimension">
|
||||
|
||||
An example of the different dimensinon macros
|
||||
|
||||
</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The dimension plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-dimension
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import dimension from "@freesewing/plugin-dimension";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, dimension);
|
||||
```
|
||||
The dimension plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-dimension
|
||||
|
||||
Now you can use the
|
||||
[hd](/reference/api/macros/hd/),
|
||||
[vd](/reference/api/macros/vd/),
|
||||
[ld](/reference/api/macros/ld/),
|
||||
[pd](/reference/api/macros/pd/),
|
||||
[rmd](/reference/api/macros/rmd/), and
|
||||
[rmad](/reference/api/macros/rmad/)
|
||||
macros in your parts.
|
||||
|
|
|
@ -3,9 +3,14 @@ title: Plugins
|
|||
---
|
||||
|
||||
FreeSewing uses a modular approach where functionality can be extended with
|
||||
plugins. Plugins can provide macros, or use any of the lifecycle hooks.
|
||||
Refer to [the plugin guide](/guides/plugins) for an in-depth look into plugins.
|
||||
plugins. Plugins can provide macros, store methods, or use any of the lifecycle
|
||||
hooks.
|
||||
|
||||
We maintain the following plugins for @freesewing/core:
|
||||
We maintain the following plugins:
|
||||
|
||||
<ReadMore />
|
||||
|
||||
## Notes
|
||||
|
||||
Refer to [the plugin guide](/guides/plugins) for an in-depth look into
|
||||
plugins.
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
---
|
||||
title: "@freesewing/plugin-export-dxf"
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-export-dxf** plugin exports your pattern
|
||||
to [the DXF file format](https://en.wikipedia.org/wiki/AutoCAD_DXF).
|
||||
It will attach the [the postDraft lifecycle
|
||||
hook](/reference/api/hooks/postdraft) to add a `renderDxf()` method
|
||||
to the pattern object.
|
||||
|
||||
<Comment by="joost">
|
||||
|
||||
##### This is de-facto unmaintained
|
||||
|
||||
This plugin is de-facto unmaintained because I have no use for it.
|
||||
I keep it around in case it might be useful, and I've used it
|
||||
myself for exporting to different software.
|
||||
|
||||
The being said, DXF is a poor choice as a file format for storing sewing patterns.
|
||||
For one thing, it only allows straight lines, no curves. Yikes!
|
||||
|
||||
</Comment>
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install @freesewing/plugin-export-dxf
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [run-time plugins](/guides/plugins/types-of-plugins#run-time-plugins), you
|
||||
load them by by passing them to the `use()` method of an instatiated pattern.
|
||||
|
||||
That method is chainable, so if you have multiple plugins you can just chain them together.
|
||||
|
||||
```js
|
||||
import Aaron from "@freesewing/aaron";
|
||||
import theme from "@freesewing/plugin-theme";
|
||||
|
||||
const pattern = new Aaron().use(theme);
|
||||
```
|
||||
|
||||
After calling `pattern.draft()` you will be able to call `pattern.renderDxf()`
|
||||
which will return the Dxf output.
|
|
@ -1,30 +1,23 @@
|
|||
---
|
||||
title: "@freesewing/plugin-flip"
|
||||
title: plugin-flip
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-flip** plugin provides [the flip
|
||||
macro](/reference/apis/macros/flip/) which flips (mirrors)
|
||||
an entire part vertically around the Y-axis.
|
||||
It's typically used to create a right and left pattern part from
|
||||
the same basis.
|
||||
Published as [@freesewing/plugin-flip][1], this plugin provides [the flip
|
||||
macro](/reference/api/macros/flip) which flips (mirrors) an entire part
|
||||
vertically around the Y-axis. It's typically used to create a right and left
|
||||
pattern part from the same basis.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-flip
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import flip from "@freesewing/plugin-flip";
|
||||
import config from "../config";
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-flip
|
||||
|
||||
const Pattern = new freesewing.Design(config, flip);
|
||||
```
|
||||
|
||||
Now you can use [the flip macro](/reference/api/macros/flip) in your parts.
|
||||
|
|
|
@ -2,15 +2,13 @@
|
|||
title: "@freesewing/plugin-gore"
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-gore** plugin provides
|
||||
[the gore macro](/reference/api/macros/gore).
|
||||
This macro allows you to generate [gore
|
||||
segments](https://en.wikipedia.org/wiki/Gore_\(segment\)) —
|
||||
2D panels to create a sphehrical shape as used in hats for example —
|
||||
to your design.
|
||||
Published as [@freesewing/plugin-gore][1], this plugin provides [the gore
|
||||
macro](/reference/api/macros/gore) which allows you to generate [gore
|
||||
segments](https://en.wikipedia.org/wiki/Gore_\(segment\)); 2D panels to create
|
||||
a sphehrical shape as used in hats for example.
|
||||
|
||||
You'll be happy to hear that this plugin handles all the
|
||||
mathematics for you to create a (part-)sphere in your patterns.
|
||||
This plugin handles all the mathematics to create a (part-)sphere in your
|
||||
patterns.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -20,15 +18,9 @@ npm install @freesewing/plugin-gore
|
|||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import gore from "@freesewing/plugin-gore";
|
||||
import config from "../config";
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-gore
|
||||
|
||||
const Pattern = new freesewing.Design(config, gore);
|
||||
```
|
||||
|
||||
Now you can use the [gore](/reference/api/macros/gore) macro in your parts.
|
||||
|
|
|
@ -1,36 +1,26 @@
|
|||
---
|
||||
title: "@freesewing/plugin-grainline"
|
||||
title: plugin-grainline
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-grainline** plugin provides [the grainline
|
||||
macro](/reference/macros/grainline/) which adds a _grainline_ indicator
|
||||
to your design.
|
||||
|
||||
<Example part="plugin_grainline">An example of the grainline macro</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The grainline plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-grainline][1], this plugin provides [the
|
||||
grainline macro](/reference/api/macros/grainline) which adds a _grainline_
|
||||
indicator to your design.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-grainline
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import grainline from "@freesewing/plugin-grainline";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, grainline);
|
||||
```
|
||||
The grainline plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-grainline
|
||||
|
||||
Now you can use [the grainline macro](/reference/api/macros/grainline) in your parts.
|
||||
|
|
|
@ -1,40 +1,29 @@
|
|||
---
|
||||
title: "@freesewing/plugin-i18n"
|
||||
title: plugin-i18n
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-i18n** plugin provides a mechanism to translate your designs.
|
||||
It does that by attaching to [the insertText lifecycle hook](/reference/api/hooks/inserttext) to
|
||||
intercept all operations that add text to a design and attempt to translate the text
|
||||
prior to insertion.
|
||||
|
||||
<Note>
|
||||
|
||||
This plugin provides the mechanism for translation, but does not come with translations itself.
|
||||
For this, you can use our [i18n package](/reference/packages/i18n).
|
||||
|
||||
</Note>
|
||||
Published as [@freesewing/plugin-i18n][1], this plugin faciliates
|
||||
translation of your designs.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-i18n
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/#build-time-plugins), you load them
|
||||
by passing them to the [`freesewing.Design`](/reference/api#design) constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import aaron from "@freesewing/aaron";
|
||||
import i18n from "@freesewing/plugin-i18n";
|
||||
import translations from "@freesewing/i18n";
|
||||
## Notes
|
||||
|
||||
const pattern = new aaron()
|
||||
.use(i18nPlugin, { strings: translations });
|
||||
```
|
||||
This plugin provides the mechanism for translation, but does not come with
|
||||
translations itself. For this, you can use our [i18n
|
||||
package](/reference/packages/i18n).
|
||||
|
||||
You should also pass a second argument which holds your translations.
|
||||
To add (your own) translations, you should pass data to this plugin.
|
||||
It should be structured as such:
|
||||
|
||||
```js
|
||||
|
@ -50,3 +39,8 @@ It should be structured as such:
|
|||
}
|
||||
}
|
||||
```
|
||||
|
||||
The i18n plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-i18n
|
||||
|
||||
|
|
|
@ -1,37 +1,25 @@
|
|||
---
|
||||
title: "@freesewing/plugin-logo"
|
||||
title: plugin-logo
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-logo** plugin provides the FreeSewing logo
|
||||
as [the logo snippet](/reference/api/snippets/logo).
|
||||
It's a plugin you most likely want to replace with your own version
|
||||
if you want to generate patterns with your own branding.
|
||||
|
||||
<Example part="plugin_logo">An example of the logo snippet</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The logo plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-logo][1], this plugin provides [the logo
|
||||
macro](/reference/api/macros/logo) which adds FreeSewing's logo to your
|
||||
design.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-logo
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import logo from "@freesewing/plugin-logo";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, logo);
|
||||
```
|
||||
The logo plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
You can now use the [logo](/reference/api/snippets/logo) snippet in your parts.
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-logo
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
title: "@freesewing/plugin-measurements"
|
||||
title: plugin-measurements
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-measurements** plugin attaches
|
||||
to [the preDraft lifecycle hook](/reference/api/hooks/predraft) to
|
||||
Published as [@freesewing/plugin-measurements][1], this plugin will
|
||||
provide a number of extra measurements to your pattern insofar as
|
||||
they can be deduced from the measurements that are provided.
|
||||
|
||||
|
@ -17,12 +16,6 @@ It will add the following measurements:
|
|||
- `waistFrontArc` (if both `waist` and `waistBack` are provided)
|
||||
- `crossSeamBack` (if both `crossSeam` and `crossSeamFront` are available)
|
||||
|
||||
<Tip>
|
||||
|
||||
The measurements plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
|
@ -31,13 +24,12 @@ npm install @freesewing/plugin-measurements
|
|||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import measurements from "@freesewing/plugin-measurements";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, measurements);
|
||||
```
|
||||
The measurements plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-measurements
|
||||
|
|
|
@ -1,36 +1,25 @@
|
|||
---
|
||||
title: "@freesewing/plugin-mirror"
|
||||
title: plugin-mirror
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-mirror** plugin provides [the mirror
|
||||
macro](/reference/api/macros/mirror) which facilitates mirroring
|
||||
a number of points and/or paths around a given mirror line.
|
||||
|
||||
<Example part="plugin_mirror">Example of the mirror plugin</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The mirror plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-mirror][1], this plugin provides [the mirror
|
||||
macro](/reference/api/macros/mirror) which facilitates mirroring a number of
|
||||
points and/or paths around a given mirror line.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-mirror
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import mirror from "@freesewing/plugin-mirror";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, mirror);
|
||||
```
|
||||
The mirror plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
You can now use the [mirror](/reference/api/macros/mirror) macro in your parts.
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-mirror
|
||||
|
|
|
@ -2,41 +2,24 @@
|
|||
title: "@freesewing/plugin-notches"
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-notches** plugin provides the following [snippets](/reference/api/snippets):
|
||||
|
||||
- [notch](/reference/api/snippets/notch)
|
||||
- [bnotch](/reference/api/snippets/bnotch)
|
||||
|
||||
<Example part="plugin_notches">
|
||||
An example of the notch and bnotch snippets
|
||||
</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The notches plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-notches][1], this plugin provides the
|
||||
[notch](/reference/api/snippets/notch) and
|
||||
[bnotch](/reference/api/snippets/bnotch) snippets.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-notches
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import notches from "@freesewing/plugin-notches";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, notches);
|
||||
```
|
||||
The notches plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
Now you can use the
|
||||
[notch](/reference/api/snippets/notch) and
|
||||
[bnotch](/reference/api/snippets/buttonhole)
|
||||
snippets in your designs.
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-notches
|
||||
|
|
|
@ -1,45 +1,29 @@
|
|||
---
|
||||
title: "@freesewing/plugin-round"
|
||||
title: plugin-round
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-round** plugin provides [the
|
||||
round macro](/reference/api/macros/round) which helps you round
|
||||
corners on your designs.
|
||||
|
||||
<Warning>
|
||||
|
||||
##### Straight corners only
|
||||
|
||||
The round macro is intended for rounding 90° angles.
|
||||
It does not support rounding other angles/corners.
|
||||
|
||||
</Warning>
|
||||
|
||||
<Example part="plugin_round">An example of the round macro</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The round plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-round][1], this plugin provides [the round
|
||||
macro](/reference/api/macros/round) which helps you round corners on your
|
||||
designs.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-round
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import round from "@freesewing/plugin-round";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, round);
|
||||
```
|
||||
The round macro is intended for rounding 90° angles.
|
||||
It does not support rounding other angles/corners.
|
||||
|
||||
The round plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-round
|
||||
|
||||
Now you can use [the round macro](/reference/macros/round/): in your parts.
|
||||
|
|
|
@ -2,46 +2,31 @@
|
|||
title: "@freesewing/plugin-scalebox"
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-scalebox** plugin provides [the
|
||||
scalebox macro](/reference/api/macros/scalebox/) with facilitates
|
||||
adding a scalebox to your design, so users can verify that the pattern
|
||||
is printed at the correct scale.
|
||||
|
||||
<Example part="plugin_scalebox">An example of the scalebox</Example>
|
||||
|
||||
<Note>
|
||||
|
||||
##### FreeSewing branding can be overruled at runtime
|
||||
|
||||
This plugin by default includes FreeSewing branding, but you can
|
||||
override that when calling the scalebox macro in case you want to
|
||||
generate your own branded designs.
|
||||
|
||||
</Note>
|
||||
|
||||
<Tip>
|
||||
|
||||
The scalebox plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-scalebox][1], this plugin provides the
|
||||
[scalebox](/reference/api/macros/scalebox) and
|
||||
[miniscale](/reference/api/macros/miniscale) macros which add a (mini) scalebox
|
||||
to your design, so users can verify that the pattern is printed at the correct
|
||||
scale.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-scalebox
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import scalebox from "@freesewing/plugin-scalebox";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, scalebox);
|
||||
```
|
||||
This plugin by default includes FreeSewing branding, but you can
|
||||
override that when calling the scalebox macro in case you want to
|
||||
generate your own branded designs.
|
||||
|
||||
The scalebox plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-scalebox
|
||||
|
||||
Now you can use the [scalebox](/reference/api/macros/scalebox/) macro in your parts.
|
||||
|
|
|
@ -1,37 +1,26 @@
|
|||
---
|
||||
title: "@freesewing/plugin-sprinkle"
|
||||
title: plugin-sprinkle
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-sprinkle** plugin provides [the
|
||||
sprinkle macro](/reference/api/macros/sprinkle/) which is a faster way
|
||||
to add several of the same snippets to your designs (think of it as
|
||||
_sprinkling_ them onto your parts).
|
||||
|
||||
<Example part="plugin_sprinkle">An example of the sprinkle macro</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The sprinkle plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-sprinkle][1], this plugin provides [the
|
||||
sprinkle macro](/reference/api/macros/sprinkle) which is a faster way to add
|
||||
several of the same snippets to your designs (think of it as _sprinkling_ them
|
||||
onto your design).
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-sprinkle
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import sprinkle from "@freesewing/plugin-sprinkle";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, sprinkle);
|
||||
```
|
||||
The sprinkle plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
Now you can use the [sprinkle](/reference/api/macros/sprinkle) macro in your parts.
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-sprinkle
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
---
|
||||
title: "@freesewing/plugin-svgattr"
|
||||
title: plugin-svgattr
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-svgattr** plugin takes an object of key-value
|
||||
pairs and adds them ass attributes to your SVG document on render.
|
||||
It leverages [the preRender lifecycle hook](/reference/api/hooks/prerender) to do so.
|
||||
Published as [@freesewing/plugin-svgattr][1], this plugin takes an object of
|
||||
key-value pairs and adds them ass attributes to your SVG document on render.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-svgattr
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import Aaron from "@freesewing/aaron";
|
||||
import svgAttr from "@freesewing/plugin-svgattr";
|
||||
import translations from "@freesewing/i18n";
|
||||
## Notes
|
||||
|
||||
const myAaron = new Aaron()
|
||||
.use(svgAttr, { class: "freesewing pattern" });
|
||||
```
|
||||
You should pass a second argument which holds key-value pairs of the attributes
|
||||
you want to add to the SVG tag.
|
||||
|
||||
You should pass a second argument which holds key-value pairs of the attributes you want to add to the SVG tag.
|
||||
The svgattr plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-svgattr
|
||||
|
|
|
@ -1,38 +1,30 @@
|
|||
---
|
||||
title: "@freesewing/plugin-theme"
|
||||
title: plugin-theme
|
||||
---
|
||||
|
||||
The **@freesewing-plugin-theme** plugin provides CSS styling for SVG output.
|
||||
It leverages [the preRender lifecycle hook](/reference/api/hooks/prerender) to
|
||||
accomplish this.
|
||||
|
||||
<Note>
|
||||
|
||||
##### Only applies to SVG/PS/PDF output
|
||||
|
||||
This plugin will inject CSS in the SVG document when rendering to SVG.
|
||||
|
||||
If you use other ways to render your pattern (like our React component)
|
||||
you will need to apply your own styles.
|
||||
|
||||
</Note>
|
||||
Published as [@freesewing/plugin-theme][1], this plugin provides CSS for
|
||||
your SVG document when rendering to SVG.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-theme
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [run-time plugins](/guides/plugins/types-of-plugins#run-time-plugins), you
|
||||
load them by by passing them to the `use()` method of an instatiated pattern.
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
That method is chainable, so if you have multiple plugins you can just chain them together.
|
||||
## Notes
|
||||
|
||||
```js
|
||||
import Aaron from "@freesewing/aaron";
|
||||
import theme from "@freesewing/plugin-theme";
|
||||
This plugin will inject CSS in the SVG document when rendering to SVG.
|
||||
|
||||
If you use other ways to render your pattern (using `Pattern.getRenderProps()`)
|
||||
you will need to apply your own styles.
|
||||
|
||||
The theme plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-theme
|
||||
|
||||
const pattern = new Aaron().use(theme);
|
||||
```
|
||||
|
|
|
@ -1,36 +1,25 @@
|
|||
---
|
||||
title: "@freesewing/plugin-title"
|
||||
title: plugin-title
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-title** plugin provides [the
|
||||
title macro](/reference/api/macros/title/) which facilitates adding part titles
|
||||
to your designs.
|
||||
|
||||
<Example part="plugin_title">An example of the title macro</Example>
|
||||
|
||||
<Tip>
|
||||
|
||||
The title plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
</Tip>
|
||||
Published as [@freesewing/plugin-title][1], this plugin provides [the title
|
||||
macro](/reference/api/macros/title) which facilitates adding part titles to
|
||||
your designs.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install @freesewing/plugin-title
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [build-time plugins](/guides/plugins/types-of-plugins#build-time-plugins), you
|
||||
load them by passing them to the [freesewing.Design](/reference/api/design) super-constructor:
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
```js
|
||||
import freesewing from "@freesewing/core";
|
||||
import title from "@freesewing/plugin-title";
|
||||
import config from "../config";
|
||||
## Notes
|
||||
|
||||
const Pattern = new freesewing.Design(config, title);
|
||||
```
|
||||
The title plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||
|
||||
Now you can use the [title](/reference/api/macros/title/) macro in your parts.
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-title
|
||||
|
|
|
@ -1,28 +1,23 @@
|
|||
---
|
||||
title: "@freesewing/versionfree-svg"
|
||||
title: versionfree-svg
|
||||
---
|
||||
|
||||
The **@freesewing/plugin-versionfree-svg** plugin suppresses
|
||||
the inclusion of the FreeSewing version number in SVG output.
|
||||
This allows diffing pattern output between versions to check for
|
||||
any differences in the output between different versions of FreeSewing.
|
||||
Published as [@freesewing/plugin-versionfree-svg][1], this plugin suppresses
|
||||
the inclusion of the FreeSewing version number in SVG output. This allows
|
||||
diffing pattern output between versions to check for any differences in the
|
||||
output between different versions of FreeSewing.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install @freesewing/plugin-bartack
|
||||
npm install @freesewing/plugin-versionfree-svg
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Like all [run-time plugins](/guides/plugins/types-of-plugins#run-time-plugins), you
|
||||
load them by by passing them to the `use()` method of an instatiated pattern.
|
||||
Either [add it as a part plugins](/reference/api/part/config/plugins) in your
|
||||
design, or [add it to a pattern instance with
|
||||
Pattern.use()](/reference/api/pattern/use).
|
||||
|
||||
That method is chainable, so if you have multiple plugins you can just chain them together.
|
||||
[1]: https://www.npmjs.com/package/@freesewing/plugin-versionfree-svg
|
||||
|
||||
```js
|
||||
import Aaron from "@freesewing/aaron";
|
||||
import versionfreeSvg from "@freesewing/plugin-versionfree-svg";
|
||||
|
||||
const pattern = new Aaron().use(versionfreeSvg);
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue