Closed iarna closed 6 years ago
The --production tag allows you to tell NPM not to download all of the developer dependencies (devDependencies) that Komada has.
Directly from NPM website:
With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies.
npm will not install the dev-deps unless running npm i from within the folder/clone of the module. For the intended use, as installing a komada as a dep, the --production flag is unneeded as suggested by this pr.
always npm
never NPM
😁 (it officially stands for nothing, which is why our website has the random initialism expansions in the top left.)
Nice good first PR @iarna! Thanks for pointing out this, the --production
flag was added during the development of 0.20.0 as somebody suggested us, we first assumed that because the npm website described it as @UnseenFaith has quoted.
Probably that specific part from the documentation was quite incomplete, as it did not specify in which scope and what are their usecases, despite of the text written above:
Even if you never publish your package, you can still get a lot of benefits of using npm if you just want to write a node program (a), and perhaps if you also want to be able to easily install it elsewhere after packing it up into a tarball (b).
We may have read about the --production
flag somewhere without reading the text above, which is referring to installing the dependencies for the library/package we're in (as-in, the one we one we have opened in our CLI), rather than an external dependency. Highlighting this difference may clear the confusion.
Best regards, kyra.
The
--production
option has no particular meaning when adding a dependency to a project.Proposed Semver Increment Bump: [MAJOR/MINOR/PATCH]
PATCH
Changes Proposed in this Pull Request (List new items in CHANGELOG.MD)
npm
usage in README.