From 235312f022b1bfc7b7ae33e0d1e8e8a13a67a24e Mon Sep 17 00:00:00 2001 From: Nicholas Ciechanowski Date: Wed, 29 Apr 2026 11:37:14 +1000 Subject: [PATCH] feat: npm copy previous release Yarn does this and it should improve performance --- contrib/npm.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/npm.php b/contrib/npm.php index 3d8299335..0a04d4f68 100644 --- a/contrib/npm.php +++ b/contrib/npm.php @@ -26,6 +26,12 @@ // install of your dependencies. desc('Installs npm packages'); task('npm:install', function () { + if (has('previous_release')) { + if (test('[ -d {{previous_release}}/node_modules ]')) { + run('cp -R {{previous_release}}/node_modules {{release_path}}'); + } + } + run('cd {{release_path}} && {{bin/npm}} ci'); });