2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
title: Plugins
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2021-12-27 17:33:49 +01:00
|
|
|
FreeSewing uses a modular approach where functionality can be extended with
|
2023-10-29 17:20:35 +01:00
|
|
|
plugins. Plugins can provide [snippets](/reference/snippets),
|
|
|
|
[macros](/reference/macros), [store methods](/reference/store-methods), or
|
|
|
|
use any of the [lifecycle hooks](/reference/hooks).
|
2021-12-27 17:33:49 +01:00
|
|
|
|
2022-12-13 04:39:07 -08:00
|
|
|
## Using plugins
|
|
|
|
|
|
|
|
Plugins can be either
|
|
|
|
[added to part configurations](/reference/api/part/config/plugins) in designs or
|
|
|
|
[added to a pattern instance with Pattern.use()](/reference/api/pattern/use).
|
|
|
|
|
|
|
|
To import a plugin for use:
|
|
|
|
```js
|
2023-10-29 17:20:35 +01:00
|
|
|
import { plugin } from { @freesewing/plugin-gore }
|
2022-12-13 04:39:07 -08:00
|
|
|
```
|
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::tip
|
2022-12-13 04:39:07 -08:00
|
|
|
|
2023-10-29 17:20:35 +01:00
|
|
|
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.
|
2022-12-13 04:39:07 -08:00
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::
|
2022-12-13 04:39:07 -08:00
|
|
|
|
|
|
|
## Plugins we maintain
|
2021-12-27 17:33:49 +01:00
|
|
|
|
|
|
|
<ReadMore />
|
2022-10-02 00:27:09 +02:00
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
Refer to [the plugin guide](/guides/plugins) for an in-depth look into
|
|
|
|
plugins.
|