diff --git a/CHANGELOG.md b/CHANGELOG.md index fa313f8..9db6775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Version 0.12 *(not released)* * Refactored windows-specific logic for npm _(peol)_ * Use temporary repository for resolving node dependencies * Using 4.4.0 (latest LTS) as default node version +* Changed default workDir location to be local to project directory * ... Version 0.11 *(2015-09-26)* diff --git a/src/main/groovy/com/moowork/gradle/node/NodeExtension.groovy b/src/main/groovy/com/moowork/gradle/node/NodeExtension.groovy index b91168c..3d8d0a9 100644 --- a/src/main/groovy/com/moowork/gradle/node/NodeExtension.groovy +++ b/src/main/groovy/com/moowork/gradle/node/NodeExtension.groovy @@ -7,8 +7,6 @@ class NodeExtension { final static String NAME = 'node' - final static String CONFIG_NAME = 'nodeDist' - def File workDir def File nodeModulesDir @@ -27,7 +25,8 @@ class NodeExtension NodeExtension( final Project project ) { - this.workDir = new File( project.gradle.gradleUserHomeDir, 'nodejs' ) + def cacheDir = new File( project.projectDir, '.gradle' ) + this.workDir = new File( cacheDir, 'nodejs' ) this.nodeModulesDir = project.projectDir }