title: Down and dirty with Grunt configuration
body: <p>I am new to GruntJs and I am trying to incorporate it within a Cordova application. It seems as though I am trying to use an advanced configuration of Grunt (calling Grunt from a separate node task) so I ended up checking out the source and there are some things I cannot figure out.</p>
  
  <p>So having spent most of the day wrestling with Grunt configuration, here are my questions:</p>
  
  <ul>
  <li><strong>Where does the <code>Gruntfile.js</code> get loaded?  Is the process different if the <code>Gruntfile.js</code> is located in a parent directory?</strong> (How/where is the task.init() called?)</li>
  </ul>
  
  <p>As I said, I am trying to link up my Grunt tasks with my Cordova build.  Cordova allows this through several hooks, each will launch a separate node instance.</p>
  
  <ul>
  <li><p><strong>How do <code>grunt.task.run()</code> and <code>grunt.tasks()</code> differ when the both seemingly do the same thing?</strong></p></li>
  <li><p><strong>What is the difference between "running" grunt from the shell and "require" grunt from a node module?</strong></p></li>
  </ul>
  
  <p>Any assistance in this matter would be appreciated.  For reference, the related Cordova question is here:
  <a href="https://stackoverflow.com/questions/27478566/cordova-build-hooks-grunt">Cordova Build Hooks + Grunt</a></p>