title: Changing Grunt config variable through command line
body: <p>I have two different paths where I want to compile the mobile vs desktop code. I would like to alternate by passing a grunt parameter in the command line.</p>
  
  <pre><code>/**
   * @module Build
   * @class Build.Config
   * @static
   */
  
  module.exports = function(grunt) {
  
  var config = {};
  
      var NewPath;
  
      var env = grunt.option('target') || "Mobile";
  
  
      if (env == "Desktop") {  // MAKE THIS DYNAMIC WITH COMMAND LINE ARGUMENT
          newPath = "source/desktop/";
      }
      else {
         newPath = "source/mobile/";
      }
  
  config.root = newPath;
  config.stylesheets = config.root + '/stylesheets';
  config.javascripts = config.root + '/javascripts';
  config.images = config.root + '/images';
  config.jsbin = config.javascripts + '/generated';
  config.cssbin = config.stylesheets + '/generated';
  config.docsbin = 'docs';
  
  
  
  // Project configuration.
  grunt.initConfig({
  
      'beautifier': {
          'options': {
              'indentSize': 1,
              'indentChar': '\t',
              'spaceAfterAnonFunction': true
          }
      },
  
      'beautify': {
          'files': [ config.javascripts + '/app/**/*.js' ]
      },
  
      'requirejs': require('./build/config/requirejs.js')(config),
  
      'watch': require('./build/config/watch.js')(config),
      'stylus':require('./build/config/stylus.js')(config)
  
  });
  
  
  // Default task.
  grunt.registerTask('default', ['stylus:compile','requirejs']);      
  grunt.registerTask('dev', ['stylus:dev']);
  
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-requirejs');
  grunt.loadNpmTasks('grunt-contrib-stylus');
  };
  </code></pre>