gradle-gulp-plugin
gradle-gulp-plugin copied to clipboard
npmInstall Task Error - Cannot find module npm-cli.js
Dear @srs,
It such a great plugin you make to enable usage of Gulp in Gradle. But i'm hitting the wall when implement gulp in my build script.
Here's my build script
plugins {
id "com.moowork.gulp" version "0.10"
}
apply plugin: 'groovy'
apply plugin: 'com.moowork.gulp'
defaultTasks 'clean', 'build'
def srcDir = new File(projectDir, "web")
def targetDir = new File(project.buildDir, "web")
gulp_build.inputs.dir srcDir
gulp_build.outputs.dir targetDir
// makes sure on each build that gulp is installed
gulp_build.dependsOn 'installGulp'
// processes your package.json before running gulp build
gulp_build.dependsOn 'npmInstall'
// runs "gulp build" as part of your gradle build
build.dependsOn gulp_build
When I try command gradle clean build, I got error that say it cannot find module npm-cli.js I am new in Gulp, please help me figure out what's wrong in my configurations.
Thanks.
Hi.
Can you try to add the following right after the plugins
-clause?
node {
download = true
}
Hi @srs
I have added it, problem solved. Anyway, I have Question what is the function of the package.json file? And what configuration must added to package.json file?
Thanks.