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
importPackage(java.io); | |
(function(args) { | |
var output = [], | |
console = { | |
log: print | |
}, | |
showUsage = function() { | |
console.log('Usage: java -jar <rhino.jar> rhino-handlebars-compiler.js --handlebars <handlebars library path> --template <template file> --output <output file>'); | |
}, |
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
#!/usr/bin/ruby1.8 | |
# Script to watch a directory for any changes to a haml file and compile it. | |
# | |
# Changes to a file named like _partial.haml will compile any haml files that | |
# reference the partial i.e. any that contain | |
# =Haml::Engine.new(File.read("/path/to/_partial.haml")).render | |
# | |
# USAGE: ruby haml_watch.rb <directory_to_watch> | |
# | |
# Original by Blake Smith / http://blakesmith.github.com/2010/09/05/haml-directory-watcher.html |