Built a tiny CLI to scaffold Vite npm libraries + live consumer apps
A developer created a CLI tool to streamline the setup of Vite npm libraries and live consumer applications. This tool automates the creation of a project structure that includes a lightweight consumer app and a Vite library. It aims to simplify the workflow for developers working on small utility or package projects.
- ▪The CLI scaffolder generates a predefined workspace structure for npm library projects.
- ▪It includes features like ESM and CJS builds, subpath exports, and a live local testing workflow.
- ▪The tool is intended to help developers avoid repetitive setup tasks when starting new projects.
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 === 1003474) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } BarbWire Posted on May 18 Built a tiny CLI to scaffold Vite npm libraries + live consumer apps #npm #cli #vite #javascript I kept rebuilding the same setup over and over whenever starting a small npm library project: Vite library config example code Vitest setup for example code exports watch mode subpath/modifier exports local consumer app linking/testing workflow So I finally turned my own workflow into a small CLI scaffolder.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).