Handling Class Libraries in Node.js (With and Without TypeScript)

<p>I&rsquo;m mad at node libraries, and I&rsquo;m just not going to take it anymore!</p> <p>I&rsquo;ve committed a lot of attention to Node.js and TypeScript over the last couple of years; I even built a startup with React and Express on it. In a lot of other languages creating a library is as simple as initiating a GUI wizard and picking a class library project type that handles all of the hard parts for you. This is made a little more complicated by adding TypeScript, transpilation, and source maps.</p> <p>Being that the best practices for building a library for Monorepos or wide distribution via npm, GitHub, and other OSS options are kind of hard to find (or I&rsquo;m bad at Googling), I&rsquo;m going to write up here everything that I&rsquo;ve found so far and show them actually in use to give other people the head start I didn&rsquo;t have (I need this information written somewhere to refer back to later).</p> <p>Let&rsquo;s start the journey from a working version and skip over the ten hours I wasted on my weekends debugging anomalous error messages referring to files I never thought should have been there in the first place</p> <p><a href="https://betterprogramming.pub/handling-class-libraries-in-node-js-with-and-without-typescript-39b73b2186b6">Read More</a></p>