READ ME ⬇️
I've got a few projects that contain similar utility functions, and instead of having to copy paste updates I want to distribute the code to a centralized place, NPM. I figured I'd record the creation of a new monorepo, gigalib (https://github.com/erikengervall/giga..., which will be the single source of truth for my utility functions.
⚠️ Disclaimer! This video was consciously made on the fly without any preparation and contain very limited editing. It'll showcase an authentic journey from zero to monorepo and how I use the web to find relevant information to set up a fairly straight forward monorepo containing two TypeScript packages (one of which even uses the other).
Contact
https://erikengervall.github.io/
Chapters
0:00 Initializing yarn
0:27 Setting up Lerna
2:26 Creating source code
5:02 Configure TypeScript
7:20 Compile & validate dist
7:52 Reconsider & install TS in root instead
8:22 Add build script using the root's TS installation
10:25 Add clean script to prevent stale compiled code
12:25 Start looking at linting & code formatting
18:22 Publish naive-deepclone lib to NPM registry
24:28 Look into Lerna lifecycle scripts
26:19 Copy-paste the second util library from hobby project
29:38 Fix naive-deepclone entrypoint bug
37:30 Generalize reorderer util
43:46 Tests are usually a good idea
1:08:55 Publish reorderer lib to NPM registry
1:12:58 Add documentation to both libraries
1:19:37 Is it even a library if it doesn't have a generic logo??
1:28:32 Struggle with displaying images from GitHub on NPM's readme page
1:33:12 Great success