Created
November 4, 2010 18:24
-
-
Save rmanalan/662905 to your computer and use it in GitHub Desktop.
Watches js/*.js and builds appropriately
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/env ruby | |
require 'rubygems' | |
require 'fssm' | |
puts "*** Now watching JS files..." | |
FSSM.monitor(Dir.pwd, ['js/*.js', 'Jimfile']) do | |
update do |base, relative| | |
unless relative.include?('bundled.js') | |
puts "*** #{relative} changed!" | |
system "jim bundle" | |
end | |
end | |
create do |base, relative| | |
unless relative.include?('bundled.js') | |
puts "*** #{relative} created!" | |
system "jim bundle" | |
end | |
end | |
delete do |base, relative| | |
puts "*** #{relative} deleted!" | |
system "jim bundle" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment