srs / gradle-gulp-plugin

Gradle plugin for running Gulp tasks
70 stars 9 forks source link

Custom node_modules location conflicts with gulpfile.js #20

Open madmas opened 8 years ago

madmas commented 8 years ago

Hi, if I got this two information bits right, I get into trouble if I want to mode the node_modules folder somewhere else but keep the gulpfile.js still in my ${projectDir}.

On the one hand, the README says (regarding the Example build file):

// if the /node_modules directory already exists somewhere other than at the base of where your build.gradle is
//  plugin looks for gulp in the node_modules directory
gulp {
    workDir = file("WebContent")
}

but on the other hand, workDir is also used to find the gulpfile.js, as said in the README under "Configuring the Plugin":

 // Set the directory where gulpfile.js should be found
    workDir = file("${project.projectDir}")

Why do I want to have node_modules somewhere else? I want to introduce a self-contained build using those plugins while maintaining compatibility for current setups and scripts.

An example of what I'm trying to do can be found at https://gist.github.com/madmas/39a29ced6bdd717a335d42ba1648f3aa

Any hints / tips how to handle such thing?