Open solonovamax opened 2 years ago
This is unfortunately a bit tricky, since for some teams npmInstall
is the majority of their build process and adding node_modules
to clean
would mean that some teams that I know would be running npmInstall
all the time.
The folders in .gradle
on the other hand is something it could be added to, but again, every clean would mean reinstalling these and normally you wouldn't need to re-install the tools between runs, sort of like how the the java toolchains work in Gradle (although those install in your home folder by default, but writing similar support is on the TODO list).
With that said, if this fits into your build then adding these folders to the clean
task is highly recommended!
This is unfortunately a bit tricky, since for some teams
npmInstall
is the majority of their build process and addingnode_modules
toclean
would mean that some teams that I know would be runningnpmInstall
all the time.
I did partially consider this, which is why I proposed adding another task, nodeClean
instead of integrating it into the main clean
task
Currently, when using the gradle node plugin, the following directories are created during the build:
.gradle/nodejs/
.gradle/npm/
node_modules/
The base gradle plugin provides a task named
clean
. This task is used to clean up all build time files, as well as anything that doesn't need to be committed to VCS. I would really appreciate if support could be added to delete those files in the clean task.An alternative to this would be to to provide an additional task:
nodeClean
, which would delete thenode_modules
,.gradle/npm
, and.gradle/nodejs
directories. It would be of the same type as theclean
task: theDelete
class.In the base gradle plugin, there exists a task named
clean
. This is used to delete all build artifacts, etc.It would be great if support for the clean task could be added, so that it deleted those directories.