title: Running a Grunt Task directly from Node
body: <p>How do I execute a Grunt task directly from Node without shelling out to the CLI?</p>
  
  <p>I've got the following "POC" code; however, "stuff" is never logged.</p>
  
  <pre><code>var grunt = require('grunt');
  
  grunt.registerTask('default', 'Log some stuff.', function() {
      console.log('stuff');
  });
  
  grunt.task.run('default'); // This is probably not the right command
  </code></pre>
  
  <p>I'm pretty new to Grunt, so I'm probably missing something obvious.  I suspect the command I'm using to "run" the task is just queuing it, and doesn't actually start running things.  I can't find documentation for manually running things, though. </p>