File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,11 +20,21 @@ check out the following guides:
2020
2121:::
2222
23+ ### [ YangonKit] ( https://github.com/retrouser955/yangonkit )
24+
25+ YangonKit is a compiler plugin for CommandKit that further reduces the
26+ boilerplate of creating a CommandKit application by providing svelte-like
27+ syntax for defining commands, and options.
28+
29+ - [ Documentation] ( https://github.com/retrouser955/yangonkit#readme )
30+ - [ GitHub repository] ( https://github.com/retrouser955/yangonkit )
31+ - [ npm package] ( https://www.npmjs.com/package/yangonkit )
32+
2333### [ Example plugin] ( # )
2434
2535This is a short placeholder description to help with the structure of
2636this list, and future pull requests.
2737
2838- [ Documentation] ( # )
2939- [ GitHub repository] ( # )
30- - [ npm package] ( # )
40+ - [ npm package] ( # )
Original file line number Diff line number Diff line change @@ -27,7 +27,12 @@ import {
2727 TransformedResult ,
2828} from ' commandkit' ;
2929
30- export class MyPlugin extends CompilerPlugin {
30+ export interface MyPluginOptions {
31+ // you can define any options you want for your plugin here
32+ // these options can be accessed via `this.options` inside the plugin class
33+ }
34+
35+ export class MyPlugin extends CompilerPlugin <MyPluginOptions > {
3136 // this is the name of the plugin
3237 public readonly name = ' my-plugin' ;
3338
@@ -52,8 +57,8 @@ export class MyPlugin extends CompilerPlugin {
5257
5358 // return the transformed contents
5459 return {
55- contents: result ,
56- loader: params . loader ,
60+ code: transformedContents ,
61+ map: null , // you can also return a source map if you want
5762 };
5863 }
5964}
You can’t perform that action at this time.
0 commit comments