I’ve got a project in CircleCI which contains a few node projects within it.
At the moment our npm install step takes a long time (10mins) and I’d like to drastically reduce this with caching. However I’d rather not type out all the node_modules directories by hand, as these will change over time.
Is it possible to define a line in cache_directories to pick up any and all node_modules folders in the project and cache them?
There’s a not-inelegant workaround that takes advantage of shell command wildcards.
Generate checksums of all files declaring your dependencies (this example is for SBT projects, but I’m sure it may apply to similar build systems) immediately following your checkout command: