👉 Note: this is here in MDX while things are small. Can always move to its own place later!
recma is a tool that transforms JS with plugins. These plugins can inspect and change the JS. You can use recma on the server, the client, CLIs, deno, etc.
recma is an ecosystem of plugins that work with JS as structured data, specifically ASTs (abstract syntax trees). ASTs make it easy for programs to deal with JS. We call those programs plugins. Plugins inspect and change trees. You can use the many existing plugins or you can make your own.
This GitHub repository is a monorepo that contains the following packages:
recma-build-jsx
— plugin to turn JSX into function callsrecma-jsx
— plugin to add support for JSXrecma-minify
— plugin to minify coderecma-parse
— plugin to take JS as input and turn it into a syntax tree (esast)recma-stringify
— plugin to take a syntax tree (estree) and turn it into JS as outputrecma
—unified
,recma-parse
, andrecma-stringify
, useful when input and output are JSrehype-recma
— plugin to transform HTML (hast) to JS (estree)
Two good ways to find plugins:
- list of plugins — list of all plugins
recma-plugin
topic — any tagged repo on GitHub