Plugin Authoring
Demonstrates building a custom plugin from scratch that supports INI-based metadata. Implements the full Plugin interface with name, extensions, extractor, and fileContentsParsers.
meta-yml9 FILESadvancedpluginsauthoring
Plugin Authoring
Demonstrates building a custom plugin from scratch that supports INI-based metadata.
What This Shows
- Implementing the full
Plugininterface (name, extensions, extractor, fileContentsParsers) - Creating a custom
Extractorthat discoversmeta.inifiles - Creating a
FileContentsParserthat strips INI comments - Registering the plugin in a TypeScript config file
Running
bash
1# Scan for examples using the custom INI plugin
2bash demo.shPlugin Structure
The INI plugin (src/ini-plugin.ts) provides:
- Extractor — scans for
meta.inifiles, parses INI key=value pairs, returnsExampleobjects - FileContentsParser — strips INI comments (
;and#lines) from.inifiles - Plugin — bundles the extractor and parser with a name and extensions list
All Example Files
FILE EXPLORER
README.md
1# Plugin Authoring
2
3Demonstrates building a custom plugin from scratch that supports INI-based metadata.
4
5## What This Shows
6
7- Implementing the full `Plugin` interface (name, extensions, extractor, fileContentsParsers)
8- Creating a custom `Extractor` that discovers `meta.ini` files
9- Creating a `FileContentsParser` that strips INI comments
10- Registering the plugin in a TypeScript config file
11
12## Running
13
14```bash
15# Scan for examples using the custom INI plugin
16bash demo.sh
17```
18
19## Plugin Structure
20
21The INI plugin (`src/ini-plugin.ts`) provides:
22
231. **Extractor** — scans for `meta.ini` files, parses INI key=value pairs, returns `Example` objects
242. **FileContentsParser** — strips INI comments (`;` and `#` lines) from `.ini` files
253. **Plugin** — bundles the extractor and parser with a name and extensions list
26