Closed AlbanMinassian closed 12 years ago
This seems fine, but could you give me a use case for this?
hello
exec: {
replace: {
command: function () { return 'sed -i \'s/ugly/'+grunt.template.process('<%= pkg.author %>')+'/g\' file.txt'; }
}
}
Cool, there are probably a few use cases where this would be useful. Rather than relying on the closure to get access to grunt
, I'll pass grunt
to the function. So it'd look something like this:
exec: {
replace: {
command: function(grunt) {
return 'sed -i \'s/ugly/'+grunt.template.process('<%= pkg.author %>')+'/g\' file.txt';
}
}
}
I'm pretty busy this week, but I'll try and get this in and release the next version of grunt-exec by next week.
This is now in v0.3.0.
Thank @jharding
allow use function to generate string command. Cordialy Ami44