You can set two parameters --base
and --gruntfile
From grunt --help
:
--base
Specify an alternate base path. By default, all file paths are relative to the Gruntfile. (grunt.file.setBase) *
--gruntfile
Specify an alternate Gruntfile. By default, grunt looks in the current or parent directories for the nearest Gruntfile.js or Gruntfile.coffee file.
So, you can execute:
grunt --base c\my_app --gruntfile c\my_app\GruntFile.js mytask