Created
June 5, 2024 10:04
-
-
Save pomber/7dbadddd7401bb1a1814769f20319ea4 to your computer and use it in GitHub Desktop.
Recma debugger plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from "node:fs" | |
import { jsx, toJs } from "estree-util-to-js" | |
function recmaPlugin() { | |
return (tree) => { | |
const result = toJs(tree, { handlers: jsx }) | |
fs.writeFileSync("recma.jsx", result.value) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment