title: How to prevent Grunt to run on Heroku in a Sails.js App with pre-executed Grunt Pipeline?
body: <p>I tried to deploy my Sails.js WebApp on heroku and got these errors:</p>
  
  <blockquote>
  <pre><code>app[web.1]: Grunt :: Running "uglify:dist" (uglify) task
  heroku[web.1]: Error R14 (Memory quota exceeded)
  heroku[web.1]: Process running mem=704M(137.5%)
  heroku[web.1]: Error R10 (Boot timeout) -&gt; Web process failed to bind to $PORT within 60 seconds of launch
  heroku[web.1]: Process exited with status 137
  </code></pre>
  </blockquote>
  
  <p>So I know I could run the uglify and other grunt tasks locally and then push the created ./tmp folder to heroku and delete the task from <code>NODE_ENV=production node app.js</code></p>
  
  <p>What I did:</p>
  
  <p>1:</p>
  
  <pre><code>$ NODE_ENV=production node app.js
  $ git add ./tmp
  </code></pre>
  
  <p>2:</p>
  
  <p>comment the tasks in <code>tasks/prod.js</code> out: </p>
  
  <pre><code> grunt.registerTask('prod', [
     /* 'compileAssets',
      'concat',
      'uglify',
      'cssmin',
      'sails-linker:prodJs',
      'sails-linker:prodStyles',
      'sails-linker:devTpl',
      'sails-linker:prodJsJade',
      'sails-linker:prodStylesJade',
      'sails-linker:devTplJade'*/
    ]);
  </code></pre>
  
  <p>3:</p>
  
  <pre><code>$ git add tasks/prod.js
  $ git commit -m "Am I doing it right?"
  $ git push heroku master
  </code></pre>
  
  <p>But now the Sever doesn't start:</p>
  
  <blockquote>
  <pre><code>app[web.1]: Grunt :: Done, without errors.
  app[web.1]: grunt hook loaded successfully.
  heroku[web.1]: Error R10 (Boot timeout) -&gt; Web process failed to bind to $PORT within 60 seconds of launch
  heroku[web.1]: Process exited with status 137
  </code></pre>
  </blockquote>
  
  <p><strong>How can I run Grunt tasks locally and push the results to heroku without running those tasks again in a Sails.js app?</strong></p>