Raathigesh
Raathigesh

Reputation: 2336

Bundling node module before distribution

I have a node module which is intended to be installed as a global module and meant to be executed in a command line. Since it's a command line tool, I want the install experience to be fast.

Rather than installing the dependencies, what If I bundle and provide a single file and have no dependencies to install. What are the pros and cons of this approach and what are the recommended tools to do such bundling?

Upvotes: 0

Views: 60

Answers (1)

Pallavi_Kalluri
Pallavi_Kalluri

Reputation: 21

I assume you just want the installer to bundle the complete set of node_modules. I don't see why you can't just let the user install them using a simple install.

We, the developers will have some huge advantages as..

  • we can decide which version of the module to use in the package.json
  • we also have a an option to use the latest and greatest version(Security concerns can be addressed fast)
  • If you are willing to publish that to npm , just having a package.json is much better than having all bundled up

after all node is about packaging and modularization,

Hope that clarifies.

Upvotes: 1

Related Questions