Created
November 14, 2019 21:51
-
-
Save patrickarlt/422732942575fcdab2530491cfb3d5cb to your computer and use it in GitHub Desktop.
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
(async () => { | |
const inPath = "./example.mdx"; | |
const outPath = "./example-out.mdx"; | |
const file = await read(inPath); | |
const processor = remark().use(mdx); | |
const tree = processor.parse(file.contents.toString()); | |
const result = processor.stringify(tree); | |
console.log("result", result); | |
await write({ | |
path: outPath, | |
result | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment