Run the following commands and share the two numbers.
1️⃣ npm ls --parseable --depth 0 | wc -l
2️⃣ npm ls --parseable | wc -l
Also, it'd be great if you shared your tech stack. I'm curious to see if certain patterns emerge.
For example, a Sapper (https://sapper.svelte.dev) app out of the box:
1️⃣ 19
2️⃣ 263
Top comments (3)
1️⃣ 70
2️⃣ 1159
Using Svelte/Sapper/Rollup/Cypress/Jest in Lerna/Yarn-workspace monorepo. Many of the dev packages are for linting, transpiling, bundler plugins, etc.
To add more context:
du -sh ./node_modules
--> 377Mdu -sh ./apps/client
--> 8.2Mnote: Monorepo used for multiple clients, typescript/express api, and util libs
I've done 0% optimizing, but exporting my Sapper app creates a bundle:
I'm personally very curious about rebuilding app in react and comparing, but as Svelte is compiled and via Sapper, SSR/code-splitting, etc is out-of-the-box and simpler.
The main contextual takeaway is that at least the bulk of the dependencies are for dev and get stripped away.
Very interesting, thanks for sharing and providing so many details.
I use a very similar tech stack, except for Jest. If your repo is public, do you mind sharing the link? Here or via direct message.
My boilerplate monorepo is at github.com/mikenikles/monorepo-tem.... Nothing optimized either but it provides the separation of concerns I care about for projects.
Nice idea, will think about integrating it into the report my research project "node-cli-arguments-options" provides
github.com/karfau/runex
10 / 718
(with added
--production
: 2/2)github.com/karfau/node-cli-argumen...
14 / 236
(with added
--production
: 1/1)github.com/bettermarks/bm-tslint-r... (no longer maintained!)
11 / 73
(with added
--production
: 7 / 57)Main app project at work (private repo):
200 / 3358
(with added
--production
: 0 / 0 since it "only hasdevDependencies
")for copy pasting or downloading as an executable script:
gist.github.com/karfau/faac18d7b49...