I have a technical blog which is built on Docusaurus. When the Docusaurus build completes, a post processing script runs to do things like:
These scripts are implemented as a simple ts-node console app. For historical reasons it’s called trim-xml (it originally just truncated the sitemap.xml file). It’s not a particularly good name but I’m not going to change it now. As the blog is open source, you can see the code of trim-xml here.
What we’re interested in, is porting this app from ts-node to Bun. The app has a few dependencies, so npm compatibility is important to us. Let’s see how it goes.