Skip to content

Instantly share code, notes, and snippets.

@kara-ryli
Created January 24, 2013 19:41
Show Gist options
  • Save kara-ryli/4626905 to your computer and use it in GitHub Desktop.
Save kara-ryli/4626905 to your computer and use it in GitHub Desktop.
Pipe Handlebars output directly to YUI Compressor, then save the results to a file of the same name.
#!/bin/bash
handlebars $1 | java -jar ~/bin/yuicompressor.jar --type js -o ${1/.handlebars/.js}
@kara-ryli
Copy link
Author

This assumes, of course, that you've got yuicompressor.jar in /Users/{username}/bin on your Mac, and that both Java and Handlebars are installed and in your path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment