Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 19 lines (16 sloc) 0.458 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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
Something went wrong with that request. Please try again.