cleanFrontend #272
-
Hi there! We are using this plugin and greatly appreciating it! However, there is a small thing that's quite baffling to us: the cleanFrontend task. By itsdocumentation (https://siouan.github.io/frontend-gradle-plugin/node-corepack-npm-pnpm-yarn-tasks#cleanFrontend), "This task does nothing by default" - but in fact, due to its dependency "Depends on: [installFrontend]", cleaning the project triggers pretty much a full install of it. Do you by chance have any advice for us, or could you maybe clarify why invoking the package manager to delete files is something we should do as well? All the best! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @JonasMorrissey, Thanks a lot for your message. I understand perfectly the frustration caused by task HistoryThe task exists from the beginning because of my personal experience, which might have been relevant years ago or not at all. When developing a Javascript application, I sometimes saw a script (i.e. in the I wondered many times if that was a good decision, before and after. As long as building the Javascript application generates artifacts in the Immediate workaroundsThat being said, disabling the FinallyI can remove the Would that be acceptable for you? |
Beta Was this translation helpful? Give feedback.
-
Aah, right, that makes perfect sense! To be able to seamlessly integrate existing Javascript projects into Gradle, the cleanFrontend task was indeed a good solution. What you propose would absolutely be acceptable for us, of course! If that's okay for you, that would be great! And I guess it will be quite easy for anybody who needs such a javascript internal clean task to re-add it to their build. |
Beta Was this translation helpful? Give feedback.
Hi @JonasMorrissey,
Thanks a lot for your message. I understand perfectly the frustration caused by task
cleanFrontend
.History
The task exists from the beginning because of my personal experience, which might have been relevant years ago or not at all. When developing a Javascript application, I sometimes saw a script (i.e. in the
scripts
section of thepackage.json
file) dedicated to the cleaning of the project by removing artifacts built. Then, I concluded it could help to integrate such cleaning action to the Gradleclean
task. Running a script may require the presence of some[dev]Dependencies
, and that's why thecleanFrontend
task depends on theinstallFrontend
task.I wondered many…