Skip to content

Instantly share code, notes, and snippets.

@faction23
Created June 4, 2013 15:56
Show Gist options
  • Save faction23/5707110 to your computer and use it in GitHub Desktop.
Save faction23/5707110 to your computer and use it in GitHub Desktop.
Tribe powershell compiler script.
$filepath=""
$compile="compiler.jar"
$jsfiles = ls $filepath -Recurse -Include *.js -Exclude *.min.js
Foreach($js in $jsfiles){$i=$js.FullName.LastIndexOf(".js")
$compressjs= $js.FullName.Remove($i)+".min.js"
java -jar $compile --compilation_level SIMPLE_OPTIMIZATIONS --define=''tribe_debug=false'' --jscomp_off=unknownDefines --js_output_file $compressjs $js.FullName
}
ls $filepath -Recurse -Include *.min.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment