Skip to content

Instantly share code, notes, and snippets.

@swichers
Created July 24, 2018 06:04
Show Gist options
  • Save swichers/d8ab155d49205db40dee6d1a71d4b024 to your computer and use it in GitHub Desktop.
Save swichers/d8ab155d49205db40dee6d1a71d4b024 to your computer and use it in GitHub Desktop.
BLT frontend-reqs script for multiple themes
#!/usr/bin/env bash
set -e
THEME_PATH=../../docroot/themes/custom
for THEME_FOLDER in "${THEME_PATH}"/*; do
if [ -d "${THEME_FOLDER}/npm" ]; then
THEME=${THEME_FOLDER%*/}
THEME=${THEME##*/}
echo "Installing frontend tools for ${THEME}."
npm --prefix="${THEME_FOLDER}/npm" install
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment