gradle-node-plugin
gradle-node-plugin copied to clipboard
Caching usage in documentation
Hi
Caching is one the most exciting features in Gradle so I would mention it in the plugin documentation. So that new developers will be easier to use it. For example:
task buildAngular(type:YarnTask, dependsOn: 'yarn_install') {
///
outputs.cacheIf { true }
///
}
Just a note that generally this is probably not how you should use Gradle's caching since NPM/Yarn have a better understanding of their domains and therefore can provide better solutions to caching.
https://docs.gradle.org/7.3/userguide/more_about_tasks.html#sec:untracked_external_tool
Sometimes you want to integrate an external tool like Git or Npm, both of which do their own up-to-date checking. In that case it doesn’t make much sense for Gradle to also do up-to-date checks.
Related to #157. Also, specifically for Yarn > v1, they have the "Plug'n'Play" thing which doesn't leave much to be cached - https://yarnpkg.com/features/pnp.