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,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue