title: Can I have a default npm install and npm install production? (Same as in gulp)
body: <p><strong>Background</strong><br>
  I'm trying to configure a production build for our app. We're using npm/gulp/maven/jenkins. The goal is to install everyting with one command - <code>mvn install -p production</code> or <code>mvn install</code> for develop (default option).</p>
  
  <p><strong>Question</strong><br>
  My question is, how do I set a profile in npm to get:<br>
  <code>npm install</code> - installs stuff from package.json and postinstall <code>gulp</code><br>
  <code>npm install production</code> - installs stuff from package.json and postinstall <code>gulp build production</code>     </p>
  
  <p><strong>Possible solutions</strong><br>
  - npm-config <a href="https://docs.npmjs.com/misc/config" rel="nofollow">https://docs.npmjs.com/misc/config</a><br>
  - npm-scripts - environemnt - <a href="https://docs.npmjs.com/misc/scripts#environment" rel="nofollow">https://docs.npmjs.com/misc/scripts#environment</a><br>
  - npmrc - <a href="https://docs.npmjs.com/files/npmrc" rel="nofollow">https://docs.npmjs.com/files/npmrc</a><br>
  - npm production - <a href="https://docs.npmjs.com/all#production" rel="nofollow">https://docs.npmjs.com/all#production</a><br>
  - NODE_ENV or other system variables</p>
  
  <p>There seems to be a way to do it but there are just so many options. How do I choose the right one? (I've read that e.g. NODE_ENV is set differently on different OS). The set up can't be that complicated, can it?</p>
  
  <p><strong>Final word</strong><br>
  I believe this a valid SO questions since probably someone else sooner or later will bump into the same problem. I will try to find an answer myself but maybe someone has a one-liner that will do it :) Thanks</p>