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
|
2022-10-02 00:27:09 +02:00
|
|
|
plugins. Plugins can provide macros, store methods, or use any of the lifecycle
|
|
|
|
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
|
|
|
|
import { namePlugin } from { @freesewing/plugin-name }
|
|
|
|
// or
|
|
|
|
import { pluginName } from { @freesewing/plugin-name }
|
|
|
|
```
|
|
|
|
|
|
|
|
<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.
|
|
|
|
|
|
|
|
</Tip>
|
|
|
|
|
|
|
|
## 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.
|