Update plugins.md

This commit is contained in:
Brahim Hadriche authored and GitHub committed 2023-09-10 22:59:19 -04:00
1 parent 50858c150f
commit 8acb7c64de
1 file changed
+8 -8
+8 -8
View File
@@ -6,7 +6,7 @@ Playlet implements a few [Brighterscript Plugins](https://github.com/rokucommuni
## Json5/Yaml support
**[Source](tools/bs-plugins/json-yaml-plugin.ts)**
**[Source](/tools/bs-plugins/json-yaml-plugin.ts)**
This plugin allows us to include `jsonc`, `json5` and `yaml` files into the app as static assets. They are an alternative to plain `json`, which for instance, does not support comments. Additionally, this plugin minifies the `json` files.
@@ -20,7 +20,7 @@ At the end of the build, the plugin scans for certain files (`jsonc`, `json`, `j
## Manifest editing
**[Source](tools/bs-plugins/manifest-edit-plugin.ts)**
**[Source](/tools/bs-plugins/manifest-edit-plugin.ts)**
This plugin allows us to make modifications to the app manifest dynamically, mostly based on compiler flags.
@@ -38,7 +38,7 @@ We simply read the content of the original manifest, and modify it before the co
## Validation
**[Source](tools/bs-plugins/validation-plugin.ts)**
**[Source](/tools/bs-plugins/validation-plugin.ts)**
This plugin allows us to add custom diagnostic errors messages to source code, to prevent using certain patterns of functions.
@@ -86,7 +86,7 @@ node.ObserveField("someField", "OnSomeFieldChanged")
## Includes
**[Source](tools/bs-plugins/component-includes-plugin.ts)**
**[Source](/tools/bs-plugins/component-includes-plugin.ts)**
This plugin allows us "include" different pieces of a component, enabling [Composition over inheritance](https://en.wikipedia.org/wiki/Composition_over_inheritance)
@@ -161,7 +161,7 @@ A couple of more details:
## @oninit
**[Source](tools/bs-plugins/oninit-plugin.ts)**
**[Source](/tools/bs-plugins/oninit-plugin.ts)**
`@oninit` is an annotation that can be added to functions, and then these functions will be called in the `Init()` function of the component it is in.
@@ -214,7 +214,7 @@ Important implementation details:
## Bindings
**[Source](tools/bs-plugins/bindings-plugin.ts)**
**[Source](/tools/bs-plugins/bindings-plugin.ts)**
This plugin allows us to "bind" different node references together. It's a simple form of dependency injection to manage dependencies between nodes.
@@ -409,7 +409,7 @@ calling `BindNode` will trigger all the binding steps just for this node. But it
## Async Task Generator
**[Source](tools/bs-plugins/asynctask-plugin.ts)**
**[Source](/tools/bs-plugins/asynctask-plugin.ts)**
This plugin generates `Task` components a scripts that makes it simpler to call a function in a background thread, and get the result in a callback function.
@@ -456,7 +456,7 @@ Although very useful, this pattern might not be the best for long running tasks
## Tracking transpilied files
**[Source](tools/bs-plugins/track-transpiled-plugin.ts)**
**[Source](/tools/bs-plugins/track-transpiled-plugin.ts)**
By now, you realize we make a lot of transformations to the source code through many plugins. As a sanity check, this plugin allows us to keep track of the transpiled files, so we can be sure that the output is what we expect.