Sha256: 10b9ca52034a112e363db4082251568a140cc213e1a90a0ca1f18a40918de69b
Contents?: true
Size: 967 Bytes
Versions: 4
Compression:
Stored size: 967 Bytes
Contents
require 'erb' require 'fileutils' require 'rake/testtask' require 'rubygems' require 'yui/compressor' 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 desc "Build the single concatenated and minified script for the browser" task :browser do sources = %w(rewriter.js lexer.js parser.js scope.js nodes.js coffee-script.js) code = sources.map {|s| File.read('lib/' + s) }.join('') code = YUI::JavaScriptCompressor.new.compress(code) File.open('extras/coffee-script.js', 'w+') {|f| f.write(code) } end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
haml-more-0.5.1 | vendor/coffee-script/Rakefile |
haml-more-0.5.0 | vendor/coffee-script/Rakefile |
haml-more-0.4.0 | vendor/coffee-script/Rakefile |
haml-more-0.4.0.d | vendor/coffee-script/Rakefile |