How does npm know you're in dev/developing mode? -
can explain me means --save-dev , how impacts distribution , how npm aware of you're trying do?
first, see answer question, what's difference between dependencies, devdependencies , peerdependencies.
that explain ton.
second, npm install devdependencies default unless 1 of 2 things true, in case devdependencies skipped. these things are:
- you explicitly tell npm it's production
npm install --production
- you set environment variable npm checks,
node_environment=production
in general, if distributing heroku, have production flag set , devdependencies not installed. install things --save-dev
or -d
flag (both same thing) if module used development, such tests/mocks/scaffolding/etc.
Comments
Post a Comment