Closed apaleslimghost closed 10 years ago
Whoops, just noticed #11. Um.
I prefer my approach as it lets you pass arguments through from the task?
If it will work that's great because it doesn't rely on the path dependency. What I was after is the ability to specify a relative path in the gruntfile.js and have it translated to a full path. For example...
gruntfile.js
grunt.initConfig({
// relative paths
projectConfig = {
dev: 'project/dev',
build: 'project/build'
},
open: {
url: '<%= projectConfig.build %>' + 'index.hta' // full path translated by path.resolve(dest);
}
});
In this example, 'project/build' becomes something like 'C:\Users\Me\Projects\project\build\'. I'm not sure how to do this type of translation with a function inside the Grunt config. Is it possible?
Closing and using the other PR since I don't want the arguments passed to the task exposed for future compatibility and coupling issues.
Lets you specify a destination as a function, e.g.