-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the setting of a working directory for Grunt tasks #22
Comments
Was this fixed? I'm still having the same issue. For my grunt tasks, I would like to be able to use the same npm modules directory configured using |
I think this is still an issue due to: Essentially, this binds grunt binaries relative to the project directory. This should be done relative to the working directory. Otherwise, it is required that |
@antillean I wasn't able to successfully use your custom task suggestion above due to the binding of |
@btiernay, you're right. I forgot to include another task redefinition that I'm using to get it to work: task gruntBuild(type: NodeTask, dependsOn: gruntInstallCustom) {
execOverrides {
it.workingDir = nodeBuildDir
}
setScript(file("$nodeBuildDir/node_modules/grunt-cli/bin/grunt"))
} And the setScript overrides the problematic line that you pointed out. |
There doesn't seem to be a way of setting Grunt's working directory. Grunt install always seems to install grunt to
node_modules/grunt
andnode_modules/grunt-cli
in my project directory, and it also always looks for Gruntfile.js in my project directory. I made a custom install task as follows to get more generic behaviour:It might be worth making a similar/corresponding change in the default grunt tasks.
(This corresponds to issue 48 of gradle-node-plugin. npmInstallCustom is defined on that ticket.)
The text was updated successfully, but these errors were encountered: