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:

  1. you explicitly tell npm it's production npm install --production
  2. 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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -