How I Structured a TypeScript Monorepo with pnpm Workspaces
When spectr-ai started as a single package, everything lived in one directory: the CLI engine, the...
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 337213) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Pavel Espitia Posted on Apr 30 How I Structured a TypeScript Monorepo with pnpm Workspaces #pnpm #monorepo #webdev #typescript When spectr-ai started as a single package, everything lived in one directory: the CLI engine, the web frontend, shared types, and configuration. It worked fine until it did not. The engine needed its own publish cycle. The web app had different build tooling. Shared types were copy-pasted between files. It was time for a monorepo.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).