You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Npm-based formatters require an npm install call to prepare running the npm process for formatting.
It would be nice if we could speedup that part (or alltogether prevent it, if it is not needed).
Some ideas:
Store the node_modules-directory and package.json somewhere in build-folder and copy/link those on later calls.
Similar, but more longevity: Store these folders/files somewhere in $HOME/.cache/spotless/npm and reuse/copy/link them from there?
Gradle-specific: Leverage gradle's build-cache by creating a gradle task that generates the package.json and node_modules dir as (cachable) output. A second/third run would then just receive these files/folders from the build cache?
The text was updated successfully, but these errors were encountered:
I'm fine with any of the above, but I think you have the order right. I would implement 2, but I would set build/spotless-npm as the root. Make it an option to set something else, such as ~/.cache/spotless-npm to be the root, but I wouldn't start with that as the default.
From discussion in #1453
Npm-based formatters require an npm install call to prepare running the npm process for formatting.
It would be nice if we could speedup that part (or alltogether prevent it, if it is not needed).
Some ideas:
node_modules
-directory andpackage.json
somewhere in build-folder and copy/link those on later calls.$HOME/.cache/spotless/npm
and reuse/copy/link them from there?package.json
andnode_modules
dir as (cachable) output. A second/third run would then just receive these files/folders from the build cache?The text was updated successfully, but these errors were encountered: