Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 997 Bytes

faq.md

File metadata and controls

40 lines (27 loc) · 997 Bytes

FAQ

This page contains a collection of frequently asked questions.

How to avoid node/npm/yarn task execution if no changes in web files?

Just add to your bundle task filesets (in and out) which this task depends on:

task bundle(type: YarnTask) {
    inputs.files(fileTree('node_modules'))
    inputs.files(fileTree('src'))
    inputs.file('package.json')
    inputs.file('webpack.config.js')
    
    outputs.dir('build/resources/static')
 
    dependsOn yarn_install
    args = ['run', 'build']
}

More info in Gradle doc

How do I use npm ci instead of npm install?

node {
    npmInstallCommand = System.getenv("CI") ? 'ci' : 'install'
}

How do I set log level for NPM install task?

This can be done adding some arguments to the already defined npmInstall-task. To set the log level to silly do this:

npmInstall.args = ['--loglevel', 'silly']