Closed lukasoppermann closed 10 years ago
Hi, you should do it like this (for example):
cwd: '<%= config.pkg.dirs.devmedia %>'
Hey @SolomoN-ua, this doesn't change anything. The problem is that somehow the config variable is not defined. I am pretty sure it would work like config.pkg.dirs.devmedia
anyway, because your version basically just puts a variable in a string and then makes this string interpret the variable (if I am not mistaking).
I did try it anyway, but receive the same error message.
You can use config
as variable only in gruntfile.js
because it is defined there, but in other files you should use it as in my example (because config
is not defined in other files), or you should use it like this:
module.exports = function(grunt, options) {
return {
cwd: options.config.pkg.dirs.devmedia
}
}
Take a look into documentation https://github.com/firstandthird/load-grunt-config#grunt-tasks-files So first make sure you are using it properly in all tasks files
Hey, thanks, the export as a function fixed it all. :+1:
Hey,
I probably do it wrong, but shouldn't this work? I always get an error, I tried replacing
config
in indata:{}
with justtest: "test"
but the error remains.gruntfile.js
tasks/options/imagemin.js