1
0
Fork 0

feat(markdown): New docs for various things

This commit is contained in:
joostdecock 2023-10-29 17:20:35 +01:00
parent 9fe93e03ce
commit 6b147d81a0
93 changed files with 1274 additions and 589 deletions

View file

@ -3,18 +3,25 @@ title: plugin-annotations
---
Published as [@freesewing/plugin-annotations][1], this plugin provides a
variety of macros and snippets to annotate designs.
variety of snippets, macros, and store methods to annotate designs.
It is part of [core-plugins](/reference/plugins/core) (so it is available by default).
## Snippets
The annotations plugin provides the following snippets:
- [bnotch](/reference/snippets/button)
- [button](/reference/snippets/button)
- [buttonhole](/reference/snippets/button)
- [buttonhole-start](/reference/snippets/button)
- [buttonhole-end](/reference/snippets/button)
- [buttonhole-start](/reference/snippets/button)
- [eyelet](/reference/snippets/eyelet)
- [logo](/reference/snippets/logo)
- [notch](/reference/snippets/button)
- [bnotch](/reference/snippets/button)
- [snap-stud](/reference/snippets/snap-stud)
- [snap-socket](/reference/snippets/snap-socket)
## Macros
The annotations plugin provides the following macros:
- [banner](/reference/macros/banner)
@ -28,7 +35,30 @@ The annotations plugin provides the following macros:
- [hd](/reference/macros/hd)
- [ld](/reference/macros/ld)
- [rmad](/reference/macros/rmad)
- [rmd](/reference/macros/rmd)
- [rmahd](/reference/macros/rmahd)
- [rmald](/reference/macros/rmald)
- [rmapd](/reference/macros/rmapd)
- [rmavd](/reference/macros/rmavd)
- [rmbanner](/reference/macros/rmbanner)
- [rmbannerbox](/reference/macros/rmbannerbox)
- [rmbartack](/reference/macros/rmbartack)
- [rmbartackAlong](/reference/macros/rmbartackalong)
- [rmbartackFractionAlong](/reference/macros/rmbartackfractionalong)
- [rmcrossbox](/reference/macros/rmcrossbox)
- [rmcutonfold](/reference/macros/rmcutonfold)
- [rmgrainline](/reference/macros/rmgrainline)
- [rmahd](/reference/macros/rmahd)
- [rmald](/reference/macros/rmald)
- [rmapd](/reference/macros/rmapd)
- [rmavd](/reference/macros/rmavd)
- [rmhd](/reference/macros/rmhd)
- [rmld](/reference/macros/rmld)
- [rmpd](/reference/macros/rmpd)
- [rmvd](/reference/macros/rmvd)
- [rmpleat](/reference/macros/rmpleat)
- [rmscalebox](/reference/macros/rmscalebox)
- [rmsewTogether](/reference/macros/rmsetogether)
- [rmtitle](/reference/macros/rmtitle)
- [pd](/reference/macros/pd)
- [pleat](/reference/macros/pleat)
- [scalebox](/reference/macros/scalebox)
@ -36,28 +66,53 @@ The annotations plugin provides the following macros:
- [title](/reference/macros/title)
- [vd](/reference/macros/vd)
The annotations plugin also provides [methods to the Store for adding cutting instructions](#methods)
<Tip> For an in-depth look at how to add cutting instructions to your part, see our [cutlist how-to](/howtos/design/cutlist) </Tip>
## Store methods
The annotations plugin also provides store methods:
- [flag.error()](/reference/store-methods/flag.error)
- [flag.fixme()](/reference/store-methods/flag.fixme)
- [flag.info()](/reference/store-methods/flag.info)
- [flag.note()](/reference/store-methods/flag.note)
- [flag.preset()](/reference/store-methods/flag.preset)
- [flag.tip()](/reference/store-methods/flag.tip)
- [flag.warn()](/reference/store-methods/flag.warn)
- [unflag.error()](/reference/store-methods/unflag.error)
- [unflag.fixme()](/reference/store-methods/unflag.fixme)
- [unflag.info()](/reference/store-methods/unflag.info)
- [unflag.note()](/reference/store-methods/unflag.note)
- [unflag.preset()](/reference/store-methods/unflag.preset)
- [unflag.tip()](/reference/store-methods/unflag.tip)
- [unflag.warn()](/reference/store-methods/unflag.warn)
## Installation
<Note>
This plugin is part of [core-plugins](/reference/plugins/core), so there is no
need to install it manually unless you want to forego loading of core plugins,
yet still want to load this plugin.
</Note>
```sh
npm install @freesewing/plugin-annotations
```
## Usage
<Note>
This plugin is part of [core-plugins](/reference/plugins/core), so there is no
need to load it manually unless you want to forego loading of core plugins,
yet still want to load this plugin.
</Note>
Either [add it as a part plugin](/reference/api/part/config/plugins) in your
design, or [add it to a pattern instance with
Pattern.use()](/reference/api/pattern/use).
To import the plugin for use:
```js
import { annotationsPlugin } from '@freesewing/plugin-banner'
// or
import { pluginAnnotations } from '@freesewing/plugin-banner'
import { plugin } from '@freesewing/plugin-annotations'
```
## Methods

View file

@ -1,37 +0,0 @@
---
title: plugin-bundle
---
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-annotations](/reference/plugins/annotations)
- [plugin-measurements](/reference/plugins/measurements) : Make extra, calculated measurements available to your patterns
- [plugin-mirror](/reference/plugins/mirror) : Mirror points and paths in your patterns
- [plugin-round](/reference/plugins/round) : Create rounded corners in your patterns
- [plugin-sprinkle](/reference/plugins/sprinkle) : Add multiple snippets to your patterns
## Installation
```bash
npm install @freesewing/plugin-bundle
```
## Usage
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).
To import the plugin for use:
```js
import { bundlePlugin } from '@freesewing/plugin-bundle'
// or
import { pluginBundle } from '@freesewing/plugin-bundle'
```
[1]: https://www.npmjs.com/package/@freesewing/plugin-bundle

View file

@ -0,0 +1,39 @@
---
title: core-plugins
---
Published as [@freesewing/core-plugins][1], our core plugins bundles the most
commonly used FreeSewing plugins in one bundle that is loaded by the core
library by default.
Specifically, loading this plugin will have the same effect as loading these
plugins individually:
- [plugin-annotations](/reference/plugins/annotations)
- [plugin-measurements](/reference/plugins/measurements) : Make extra, calculated measurements available to your patterns
- [plugin-mirror](/reference/plugins/mirror) : Mirror points and paths in your patterns
- [plugin-round](/reference/plugins/round) : Create rounded corners in your patterns
- [plugin-sprinkle](/reference/plugins/sprinkle) : Add multiple snippets to your patterns
- [plugin-binpack](/reference/plugins/binpack) : The default bin packing algorithm used to handle auto-generated layouts in core
## Installation
```bash
npm install @freesewing/core-plugins
```
## Usage
The core plugins are loaded by default so there is nothing to be done to use them.
If you do not want to load the core plugins, pass `noCorePlugins: true` to your Design constructor:
```mjs
const design = new Design({
parts: myParts,
noCorePlugins: true
})
```
[1]: https://www.npmjs.com/package/@freesewing/core-plugins

View file

@ -3,8 +3,9 @@ title: Plugins
---
FreeSewing uses a modular approach where functionality can be extended with
plugins. Plugins can provide macros, store methods, or use any of the lifecycle
hooks.
plugins. Plugins can provide [snippets](/reference/snippets),
[macros](/reference/macros), [store methods](/reference/store-methods), or
use any of the [lifecycle hooks](/reference/hooks).
## Using plugins
@ -14,16 +15,18 @@ Plugins can be either
To import a plugin for use:
```js
import { namePlugin } from { @freesewing/plugin-name }
// or
import { pluginName } from { @freesewing/plugin-name }
import { plugin } from { @freesewing/plugin-gore }
```
<Tip>
For convenience, each plugin is exported in two name formats:
"plugin\<Name>" and "\<name\>Plugin".
For example, either `pluginBanner` or `bannerPlugin` can be used.
For convenience, each plugin is exported as several names exports:
- `plugin`
- `pluginName`
- `namePlugin`
For example, `@freesewing/plugin-gore` has named exports `plugin`, `pluginGore`, and `gorePlugin` that all are the same thing.
</Tip>