You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -76,3 +76,43 @@ export class MyPlugin extends CompilerPlugin {
76
76
}
77
77
}
78
78
```
79
+
80
+
## Extending commandkit templates
81
+
82
+
CommandKit templates are a way to autogenerate files and other contents through `commandkit create` command. CommandKit by default comes with `command` and `event` templates. Compiler plugins can register custom templates to be used by the `commandkit create` command.
// remove the template from the registry when the plugin is deactivated
107
+
ctx.unregisterTemplate('event');
108
+
}
109
+
}
110
+
```
111
+
112
+
:::warning
113
+
The `registerTemplate` method must be called inside the `activate` method, and the `unregisterTemplate` method must be called inside the `deactivate` method.
114
+
:::
115
+
116
+
:::info
117
+
Plugins may override the default templates by registering their own templates with the same name.
0 commit comments