title: Proper way to run npm install on Bamboo builds for staging and production
body: <p>Recently I started to use Vue.js framework on my Symfony project. Because of that I need to start running the npm run build command with NODE_ENV attribute depending on environment I want to build the packages from.</p>
  <p>On my local machine I use <code>NODE_ENV=dev.local npm run dev</code>, while on my staging environment I use <code>NODE_ENV=staging npm run build</code>, and on production build I want to use <code>NODE_ENV=prod npm run build</code>.</p>
  <p>Now I run the whole CI on Bamboo tool. There is a single build plan for my project, which is used on both staging and production deployment projects (same .zip file created on Bamboo build project).</p>
  <p>On that build project I run the <code>NODE_ENV=staging npm run build</code> command because I need staging configs on my staging application. But now there is a problem because on my production application I want the npm to be run with <code>NODE_ENV=prod</code> attribute.</p>
  <p>All I can think for now is to run <code>NODE_ENV=prod npm run build</code> again inside the deployment process itself. Which means when deployment to staging/production server begins I run the npm command again but this time with the needed NODE_ENV attribute.</p>
  <p>Another solution would be just create another separate build project for production environment, but this way I would need to keep two different Bamboo build configs.</p>
  <p>Any ideas? I think that I might be missing something.</p>