We’re changing to having some of our front-end built on deploy now. Both major front-end modules (one for desktop, one for mobile) are node packages and use a gulp script to build. We’ve got the build process working fine without much trouble, but since we blow away our main directory on deploy to clean out stale code, that also wipes out the node_modules
and bower_components
directories for each of these packages, causing them to refetch/install every deploy.
Any obvious and clean strategies for maintaining these caches while still clearing out the main directory? Is copying those directories to some /cache/
location a viable option?
(asking while trying more options – it’s taking a while to iterate on this problem ;))