Skip to content

Commit

Permalink
Update plugins.md
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha authored Sep 11, 2023
1 parent 50858c1 commit 8acb7c6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand All @@ -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.

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit 8acb7c6

Please sign in to comment.