插件
open clothes 使用 a modular approach where functionality can be extended with plugins. 插件 can provide snippets, macros, store methods, or use any of the lifecycle hooks.
Using plugins
插件 can be either added to part configurations in designs or added to a pattern instance with Pattern.use().
To import a plugin for use:
import { plugin } from { @open clothes/plugin-gore }
提示
For convenience, each plugin is exported as several names exports:
pluginpluginNamenamePlugin
For example, @openclothes/plugin-gore has named exports plugin, pluginGore, and gorePlugin that all are the same thing.
插件 we maintain
- plugin-annotations
- plugin-bin-pack
- plugin-bust
- core-plugins
- plugin-flip
- plugin-gore
- plugin-i18n
- plugin-measurements
- plugin-mirror
- plugin-path-utils
- plugin-ringsector
- plugin-round
- plugin-sprinkle
- plugin-svgattr
- plugin-theme
- plugin-timing
- plugin-transform
- plugin-versionfree-svg
Notes
Refer to the plugin guide for an in-depth look into plugins.