title: Grunt Command Line Parameters
body: <p>I have a Grunt build file. My build file has a task that looks like the following:</p>
  
  <pre><code>myTask: {
    options: {
      configFile: "config/default.js",
      args: {   }
    },
    dev: {
      configFile: 'config/local.js',
      options: { args: {} },
    },
    test: {
      configFile: 'config/remote.js',
      options: { args: {} }
    }
  }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>grunt.registerTask('customTask', ['myTask:dev']);
  grunt.registerTask('customTask-Test', ['myTask:test']);
  </code></pre>
  
  <p>Currently, I can run the following from the command line:</p>
  
  <pre><code>&gt; grunt customTask
  </code></pre>
  
  <p>Everything works fine. However, I need to add the ability to do something like this:</p>
  
  <pre><code>&gt; grunt customTask --myParam=myValue
  </code></pre>
  
  <p>I need to look at the value of myParam in my "dev" task target. However, I can't figure out how to do it.
  I would be happy if I could just print out the value of myParam when myTask:dev is ran. In other words,
  I'd like to see the following when run</p>
  
  <pre><code>&gt; grunt customTask
  
  &gt; grunt customTask --myParam=hello
  You entered hello
  
  &gt; grunt customTask-Test
  
  &gt; grunt customTask-Test --myParam=hello
  </code></pre>
  
  <p>How do I do something like this?</p>