Skip to content

Instantly share code, notes, and snippets.

@su-narthur
Created December 13, 2017 15:40
Show Gist options
  • Save su-narthur/59f44f5d0598d90a194756f0b79335a4 to your computer and use it in GitHub Desktop.
Save su-narthur/59f44f5d0598d90a194756f0b79335a4 to your computer and use it in GitHub Desktop.
Attempt at creating a bash script that would inject variables and compile out css from less files to allow for more complete static analysis of SUFramework themes
#!/usr/bin/env bash
echo "hi"
VARS=""
while read -r line
do
VARS="${VARS}--global-var=${line}=red "
done < <(cat theme/SUThemeSpruce/style/*.less | egrep -o 'config-\w+')
echo ${VARS}
lessc ${VARS} theme/SUThemeSpruce/style/global.less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment