title: Enable Debug mode at build time using Grunt
body: <p>I would like to mock some services of a client side web application when I am during development and use proper services when in production.</p>
  
  <p>It would be great if I could do this at build time by passing grunt a flag or something that I could then use in the code to know what endpoints to use.</p>
  
  <p>My idea is to do something like this:
  <code>if (DEBUG) {
  service = MOCK_SERVICE; } else { service = SERVICE; }</code>
  and set this <code>DEBUG</code> flag at build.</p>
  
  <p>If there is a solution for this or even a better alternative, I would much appreciate it.</p>
  
  <p>Thanks</p>