Permalink
Fetching contributors…
Cannot retrieve contributors at this time
118 lines (91 sloc) 4.88 KB

retext

Plugins

retext is an ecosystem of plug-ins.

Table of Contents

List of Plugins

List of Utilities

See nlcst for a list of utilities for working with the CST. See unist for other utilities which work with nlcst nodes, too.

And finally, see vfile for a list of utilities for working with virtual files.

Using plugins

To use a plug-in programmatically, invoke the use() function.

Creating plugins

First, read up on the concept of plug-ins. Then, read the guide on “Creating a plugin with unified”. Finally, take one of existing plug-ins, which looks similar to what you’re about to do, and work from there. If you get stuck, issues and Gitter are good places to get help.

You should pick a name prefixed by "retext-", such as retext-lint.

Note that, if the thing you create cannot be given to retext().use(), it isn’t a “plug-in”. Don’t use the retext- prefix as that could confuse users. If it works with the NLCST tree, use 'nlcst-', if it works with any Unist tree, use unist-util-, if it works with virtual files, use vfile-.