Permalink
Browse files

Revert "Revert "Fixes #756 -- switch to uglifier (passes tests)""

This reverts commit 7943cd1.
  • Loading branch information...
jashkenas committed Sep 20, 2012
1 parent 7943cd1 commit b83b68e3ec91b7e9a406989707849a8996b91e81
Showing with 12 additions and 29 deletions.
  1. +2 −2 Rakefile
  2. +1 −1 test/index.html
  3. +9 −26 underscore-min.js
View
@@ -1,13 +1,13 @@
require 'rubygems'
-require 'closure-compiler'
+require 'uglifier'
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)
+ min = Uglifier.compile(source)
File.open('underscore-min.js', 'w') do |file|
file.write header[1].squeeze(' ') + min
end
View
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
<html>
<head>
<title>Underscore Test Suite</title>
Oops, something went wrong.

0 comments on commit b83b68e

Please sign in to comment.