chore(markdown): Updated plugin docs
This commit is contained in:
parent
6c2977bf0d
commit
01cf9d5254
7 changed files with 195 additions and 6 deletions
|
@ -1,13 +1,12 @@
|
||||||
---
|
---
|
||||||
title: Macros
|
title: Macros
|
||||||
for: developers
|
|
||||||
about: Complete list of all available macros and how to use them
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Macros are a way to combine different operations into a single command,
|
Macros are a way to combine different operations into a single command.
|
||||||
and are typically provided by plugins.
|
They are provided by plugins, but can also be added without the need for
|
||||||
|
a plugin.
|
||||||
|
|
||||||
Below is a list of available macros:
|
Below is a list of macros from [the plugins we maintain](/reference/plugins):
|
||||||
|
|
||||||
<ReadMore list />
|
<ReadMore list />
|
||||||
|
|
||||||
|
|
45
markdown/dev/reference/plugins/export-dxf/en.md
Normal file
45
markdown/dev/reference/plugins/export-dxf/en.md
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
---
|
||||||
|
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.
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
|
||||||
|
##### Maintainer note: 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!
|
||||||
|
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
## 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.
|
35
markdown/dev/reference/plugins/gore/en.md
Normal file
35
markdown/dev/reference/plugins/gore/en.md
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
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.
|
||||||
|
|
||||||
|
You'll be happy to hear that this plugin handles all the
|
||||||
|
mathematics for you to create a (part-)sphere in your patterns.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```sh
|
||||||
|
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:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import freesewing from "@freesewing/core";
|
||||||
|
import gore from "@freesewing/plugin-gore";
|
||||||
|
import config from "../config";
|
||||||
|
|
||||||
|
const Pattern = new freesewing.Design(config, gore);
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can use the [gore](/reference/api/macros/gore) macro in your parts.
|
||||||
|
|
38
markdown/dev/reference/plugins/measurements/en.md
Normal file
38
markdown/dev/reference/plugins/measurements/en.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
---
|
||||||
|
title: "@freesewing/plugin-measurements"
|
||||||
|
---
|
||||||
|
|
||||||
|
The **@freesewing/plugin-measurements** plugin attaches
|
||||||
|
to [the preDraft lifecycle hook](/reference/api/hooks/predraft) to
|
||||||
|
provide a number of extra measurements to your pattern insofar as
|
||||||
|
they can be deduced from the measurements that are provided.
|
||||||
|
|
||||||
|
It will add the following measurements:
|
||||||
|
|
||||||
|
- `seatFront` (if both `seat` and `seatBack` are provided)
|
||||||
|
- `seatBackArc` (if both `seat` and `seatBack` are provided)
|
||||||
|
- `seatFrontArc` (if both `seat` and `seatBack` are provided)
|
||||||
|
- `waistFront` (if both `waist` and `waistBack` are provided)
|
||||||
|
- `waistBackArc` (if both `waist` and `waistBack` are provided)
|
||||||
|
- `waistFrontArc` (if both `waist` and `waistBack` are provided)
|
||||||
|
- `crossSeamBack` (if both `crossSeam` and `crossSeamFront` are available)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```sh
|
||||||
|
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:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import freesewing from "@freesewing/core";
|
||||||
|
import measurements from "@freesewing/plugin-measurements";
|
||||||
|
import config from "../config";
|
||||||
|
|
||||||
|
const Pattern = new freesewing.Design(config, measurements);
|
||||||
|
```
|
||||||
|
|
43
markdown/dev/reference/plugins/notches/en.md
Normal file
43
markdown/dev/reference/plugins/notches/en.md
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
---
|
||||||
|
title: "@freesewing/plugin-notches"
|
||||||
|
---
|
||||||
|
|
||||||
|
The **@freesewing/plugin-notces** 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 button, buttonhole, buttonhole-start, buttonhole-end, snap-stud, and snap-socket snippets
|
||||||
|
</Example>
|
||||||
|
|
||||||
|
<Tip>
|
||||||
|
|
||||||
|
The notches plugin is part of our [plugin-bundle](/reference/plugins/bundle)
|
||||||
|
|
||||||
|
</Tip>
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import freesewing from "@freesewing/core";
|
||||||
|
import notches from "@freesewing/plugin-notches";
|
||||||
|
import config from "../config";
|
||||||
|
|
||||||
|
const Pattern = new freesewing.Design(config, notches);
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can use the
|
||||||
|
[notch](/reference/api/snippets/notch) and
|
||||||
|
[bnotch](/reference/api/snippets/buttonhole)
|
||||||
|
snippets in your designs.
|
||||||
|
|
|
@ -35,6 +35,6 @@ That method is chainable, so if you have multiple plugins you can just chain the
|
||||||
import Aaron from "@freesewing/aaron";
|
import Aaron from "@freesewing/aaron";
|
||||||
import theme from "@freesewing/plugin-theme";
|
import theme from "@freesewing/plugin-theme";
|
||||||
|
|
||||||
const myAaron = new Aaron().use(theme);
|
const pattern = new Aaron().use(theme);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
29
markdown/dev/reference/plugins/versionfree-svg/en.md
Normal file
29
markdown/dev/reference/plugins/versionfree-svg/en.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
title: "@freesewing/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.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install @freesewing/plugin-bartack
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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 versionfreeSvg from "@freesewing/plugin-versionfree-svg";
|
||||||
|
|
||||||
|
const pattern = new Aaron().use(versionfreeSvg);
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue