Dual Node TypeScript Packages - The Easy Way
Raggi

Raggi @ragrag

About: Passionate about backend engineering and building things

Joined:
Jun 14, 2020

Dual Node TypeScript Packages - The Easy Way

Publish Date: Jul 29 '24
8 1

Well we've all been down that road haven't we? trying to build a Node TypeScript package that supports both ESM/CJS without losing our mind in the process.

I took it upon myself to lose my own mind while keeping you sane 🫡

Introducing moshimosh, The easiest way to bootstrap a Node Hybrid TypeScript package with modern tooling that just works, all you need is

  npx moshimosh
Enter fullscreen mode Exit fullscreen mode

You Get

  • Hybrid ESM/CJS that just works
  • Tests and Coverage with vitest
  • Linting/Formatting with Biome
  • Linting/Formatting Git Pre-commit hooks
  • Documentation generation from your compiled .d.ts with typedoc
  • Github action for building and testing
  • Github action for updating docs in a GitHub Pages repo

And if i saved you some sanity, please check out the GitHub Repo, all contributions are welcome!

Comments 1 total

  • Vinay
    VinayAug 4, 2024

    Looks interesting. Must try

Add comment