跳到主要内容

插件

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:

  • plugin
  • pluginName
  • namePlugin

For example, @openclothes/plugin-gore has named exports plugin, pluginGore, and gorePlugin that all are the same thing.

插件 we maintain

Notes

Refer to the plugin guide for an in-depth look into plugins.