![]() ![]() I installed Bun on my Ubuntu machine using the following command: curl -fsSL | bash The app has a few dependencies, so npm compatibility is important to us. What we’re interested in, is porting this app from ts-node to Bun. As the blog is open source, you can see the code of trim-xml here. It’s not a particularly good name but I’m not going to change it now. For historical reasons it’s called trim-xml (it originally just truncated the sitemap.xml file). These scripts are implemented as a simple ts-node console app. patch the HTML files to use Cloudinary as an image CDN for Open Graph images. ![]() update the sitemap.xml to include the lastmod date, based on git commit date, and truncate the number of entries in the file.When the Docusaurus build completes, a post processing script runs to do things like: I have a technical blog which is built on Docusaurus. Clarification about the fs.promises API.In this post I‘ll investigate just how easy it is to port a TypeScript app from Node.js to Bun. I’ve been using ts-node for a long time now it’s what I reach for when I’m building any kind of console app. I want to be able to run my code in a runtime that isn’t Node.js and still be able to use npm packages. The thing that has held me back is npm compatibility. I’ve wanted to take a look at some of the alternative JavaScript runtimes for a while. John Reilly Follow MacGyver turned Dev □❤️ TypeScript / ts-loader / fork-ts-checker-webpack-plugin / DefinitelyTyped: The Movie Migrating a TypeScript app from Node.js to Bun ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |