Plugins
October 21, 2024 · View on GitHub
recma is a tool that transforms JavaScript with plugins. See the monorepo readme for info on what the recma ecosystem is. This page lists existing plugins.
Contents
List of plugins
Plugins can be found on GitHub tagged with the
recma-plugin topic.
The list of plugins:
recma-build-jsx— add support for turning JSX into function callsrecma-jsx— add support for JSXrecma-mdx-escape-missing-components— set the default() => nullfor missing components in MDXrecma-mdx-is-mdx-component— define anisMdxComponentproperty on MDX componentsrecma-minify— plugin to minify coderecma-nextjs-static-props— expose top-level identifiers in Next.jsapp.js
List of utilities
See esast for a list of utilities that work with the syntax tree. See unist for other utilities which work with esast/estree and other syntax trees too. Finally, see vfile for a list of utilities working with virtual files.
Use plugins
To use a plugin programmatically,
call the use() function.
Create plugins
To create a plugin, first read up on the concept of plugins. Then, read the guide on “Creating a plugin with unified”. Finally, take one of existing plugins, which looks similar to what you’re about to make, and work from there. If you get stuck, discussions is a good place to get help.
You should pick a name prefixed by 'recma-' (such as recma-format).
Do not use the recma- prefix if the thing you create doesn’t work with
recma().use(): it isn’t a “plugin” and will confuse users.
If it works with esast or estree,
use 'esast-util-' or estree-util,
if it works with any unist tree,
use unist-util-,
and if it works with virtual files,
use vfile-.
Use default exports to expose plugins from your packages,
add recma-plugin keywords in package.json,
add a recma-plugin topic to your repo on GitHub,
and create a pull request to add the plugin here on this page!