Live data from Hacker News

Show HN: Node.js node_modules file pruning

github.com

21–30 of 66 posts

Re: Show HN: Node.js node_modules file pruning

#24

Earlier quoted context omitted.

It's for Lambda

Maybe documentation should include uses cases? Newer users to npm + node might think this does something different. Just a suggestions.

Maybe documentation for everything should contain use cases, first, before anything.

Every Javascript tool has documentation the wrong way round. Quick start guides and installation instructions are useless if you don't even have a good reason to use the tool in the first place.

Re: Show HN: Node.js node_modules file pruning

#26

TJ, https://apex.sh/ is so beautiful. Did you design it entirely yourself or did you get help and if so who helped? Also mind if I ask what your inspirations were?

Thanks! I do all the design stuff myself. I wouldn't call myself a designer, but I do enjoy it either way!

Re: Show HN: Node.js node_modules file pruning

#27

TJ, https://apex.sh/ is so beautiful. Did you design it entirely yourself or did you get help and if so who helped? Also mind if I ask what your inspirations were?

Thanks! I do all the design stuff myself. I wouldn't call myself a designer, but I do enjoy it either way!

I think it's safe to start calling yourself that... love it and will definitely be using it as inspiration.

Re: Show HN: Node.js node_modules file pruning

#28
Is this serious?

I mean, kudos for helping push node module developers to make better use of `.npmignore` et al, but this project strikes me as overly snarky or even trolling...

Seems like what we really need is for some volunteers to tackle the most-installed packages on npm that publish with many extraneous files.

Hell, you could even automate it by writing a bot that (politely) points out likely-extraneous files and opens a pull request with changes to `.npmignore` to clean things up... Hmm... Weekend project brewing...

Re: Show HN: Node.js node_modules file pruning

#29
post #28

Is this serious? I mean, kudos for helping push node module developers to make better use of `.npmignore` et al, but this project strikes me as overly snarky or even trolling... Seems like what we really need is for some volunteers to tackle the most-installed packages on npm that publish with many extraneous files. Hell, you could even automate it by writing a bot that (politely) points out likely-extraneous files a…

It's not a troll, this is for AWS Lambda, where size impacts deployments and cost starts. See my comment below about the automation, I think it could/should be done too!

Re: Show HN: Node.js node_modules file pruning

#30
post #18

Earlier quoted context omitted.

Ideally people use the "files" array. It might be nice if someone writes a bot to go around and fix large packages by adding that.

Many authors are strangely against it for some reason. One time I sorted my node_modules by size and opened issues for the top offenders, you can see their resistance here: https://github.com/crypto-browserify/sha.js/issues/5 https://github.com/medikoo/es5-ext/issues/11

Speaking as very-much-not-a-JS-developer: Isn't this essentially the same problem Linux package managers solve with -dev, -doc, and -dbg packages? I.e. the default install only contains the minimum necessary to use a program, and if you need the header files/documentation/debug symbols, you can just install them separately.

Is it too hard to meaningfully separate these parts of a package, or is it more of a philosophical issue?

Post reply on HN