In my Gruntfile, how can I add log statements, to its processing, as in the following example?
karma: {
unit: {
configFile: "<%= grunt.option('Debug') ? 'build/karma.conf.js' : '' %>",
console.log(configFile),
singleRun: true,
browsers: ['PhantomJS']
},
}
Gruntfiles are javascript so you can use console.log()
where ever as long as it is valid javascript.
grunt.initConfig({
karma: {
unit: {
configFile: 'build/karma.conf.js'
}
}
});
if (grunt.option('debug')) {
console.log(grunt.config('karma.unit.configFile'));
}