-
Our projects are organized into an Angular workspace so there is one package.json at the top level, several libraries, and several projects that depend on those libraries. In order to facilitate running in parallel, I placed a build.gradle in each project and library folder. Using configurations I was able to set up dependencies such that the libraries build first followed by the projects that depend on those libraries. What I'm trying to figure out is how to set dependencies on the npmInstall task to guarantee that it only runs one time. If I set each npm task to depend on npmInstall, will that result in it trying to install multiple times simultaneously or is it smart enough to detect that every subproject should depend on the same install task? I thought that maybe I could add a dependency only on the libraries since each of the projects depend on at least one of our libraries. However, if I have two libraries that don't have any other dependencies, and thus are able to run in parallel, will both libraries try to run npmInstall? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Running But how does your setup look? Do you have the plugin applied in each project and library folder as well? |
Beta Was this translation helpful? Give feedback.
Running
npmInstall
twice should in general be safe,npm
itself knows if it needs to do anything and if there's nothing to do it'll finish very quickly.But how does your setup look? Do you have the plugin applied in each project and library folder as well?
If you do then you'll get a
npmInstall
(and ifdownload = true
unfortunately also anodeSetup
andnpmSetup
task) in each project and library folder (and it'll run fine in parallel)