Skip to content

Instantly share code, notes, and snippets.

@sagalbot
Last active May 31, 2020 16:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sagalbot/d025f283288ad2176914c596dddaa9b5 to your computer and use it in GitHub Desktop.
Save sagalbot/d025f283288ad2176914c596dddaa9b5 to your computer and use it in GitHub Desktop.
Quick Yarn Installs on Laravel Envoyer, share `node_modules` between deployments.
cd {{ release }}
# link node_modules from last deployment
ln -s {{ project }}/node_modules
# update linked folder with latest deps
yarn install
# remove the symlink
rm node_modules
# copy the updated node_modules
cp -a {{ project }}/node_modules {{ release }}/node_modules
## BE SURE TO UPDATE THEME_NAME
cd {{ release }}/wp-content/themes/THEME_NAME
# link node_modules from last deployment
ln -s {{ project }}/node_modules
# update linked folder with latest deps
yarn install
# remove the symlink
rm node_modules
# copy the updated node_modules
cp -a {{ project }}/node_modules {{ release }}/wp-content/themes/THEME_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment