Re:Bundle Phobia: find the cost of adding an npm package to ...
by styfle on Monday December 18, 2017 @03:23PM
(#15955127)
Some packages ship with both importable module as well as a global CLI. So it’s hard to categorize packages on into a single category.
Re:Bundle Phobia: find the cost of adding an npm package to ...
by pavlov on Monday December 18, 2017 @04:53PM
(#15955856)
The library should be in a library package manager, and the CLI tool should be installed separately with a dependency on the library. There’s no benefit to mixing these together.
If you hand me a .framework and a .app for macOS, it’s immediately clear which is which. This isn’t an unreasonable standard for distributing programs.
IMO the problem with npm is that it makes no distinction between snippets, libraries, frameworks and scripted command line tools. An npm package can be any of these. I feel there perhaps should be separate namespaces and package managers for all four — e.g. an inlining minimal “node snippet manager”, a standardized framework installer for things like create-react-app, and so on.