Last active
February 4, 2016 19:45
-
-
Save judepereira/99df70350156c54ff3fd to your computer and use it in GitHub Desktop.
A helper to re-compile LESS into CSS for an exploded WAR deployment in IntelliJ IDEA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exploded_artifact_path=/Users/jude/developer/WizRocket/out/artifacts/Dashboard_war_exploded | |
less=/usr/local/bin/lessc | |
function update { | |
target=`echo $1 | sed s/web\\// | sed s/.less/.css/` | |
echo "Generating $exploded_artifact_path/$target" | |
$less $1 $exploded_artifact_path/$target | |
} | |
function all { | |
find $exploded_artifact_path -name *.less | while read path; do | |
output=`echo $path | sed s/.less/.css/` | |
echo "Generating $output" | |
$less $path $output | |
done | |
} | |
$1 $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment