Sha256: 5f1f8ed9f8eb55703c22a2c2fb94af293da183b4cde06d64330603705b515dc2
Contents?: true
Size: 560 Bytes
Versions: 3
Compression:
Stored size: 560 Bytes
Contents
require 'erb' require 'fileutils' require 'rake/testtask' desc "Build the documentation page" task :doc do source = 'documentation/index.html.erb' child = fork { exec "bin/coffee documentation/coffee/*.coffee -o documentation/js -w" } at_exit { Process.kill("INT", child) } Signal.trap("INT") { exit } loop do mtime = File.stat(source).mtime if !@mtime || mtime > @mtime rendered = ERB.new(File.read(source)).result(binding) File.open('index.html', 'w+') {|f| f.write(rendered) } end @mtime = mtime sleep 1 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
haml-more-0.4.0.c | vendor/coffee-script/Rakefile |
haml-more-0.4.0.b | vendor/coffee-script/Rakefile |
haml-more-0.4.0.a | vendor/coffee-script/Rakefile |