Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (16 sloc) 0.458 kb
require 'rubygems'
require 'closure-compiler'
HEADER = /((^\s*\/\/.*\n)+)/
desc "Use the Closure Compiler to compress Underscore.js"
task :build do
source = File.read('underscore.js')
header = source.match(HEADER)
min = Closure::Compiler.new.compress(source)
File.open('underscore-min.js', 'w') do |file|
file.write header[1].squeeze(' ') + min
end
end
desc "Build the docco documentation"
task :doc do
sh "docco underscore.js"
end
Jump to Line
Something went wrong with that request. Please try again.