33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
From ed512e2f221362f8af932321c58c5b4c0b0bcf1d Mon Sep 17 00:00:00 2001
|
|
From: Jamie Nguyen <j@jamielinux.com>
|
|
Date: Sat, 22 Jun 2013 17:39:12 +0100
|
|
Subject: [PATCH] Ensure correct encoding is used for 'rake build'
|
|
|
|
---
|
|
Rakefile | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/Rakefile b/Rakefile
|
|
index 587c81b..2cd9eed 100644
|
|
--- a/Rakefile
|
|
+++ b/Rakefile
|
|
@@ -4,7 +4,7 @@ task default: :test
|
|
desc 'Use UglifyJS to compress Underscore.string'
|
|
task :build do
|
|
require 'uglifier'
|
|
- source = File.read('lib/underscore.string.js')
|
|
+ source = File.read('lib/underscore.string.js', :encoding => 'utf-8')
|
|
compressed = Uglifier.compile(source, copyright: false)
|
|
File.open('dist/underscore.string.min.js', 'w'){ |f| f.write compressed }
|
|
compression_rate = compressed.length.to_f/source.length
|
|
@@ -20,4 +20,4 @@ task :test do
|
|
result2 = system %{phantomjs ./test/run-qunit.js "test/test_underscore/index.html"}
|
|
|
|
exit(result1 && result2 ? 0 : 1)
|
|
-end
|
|
\ No newline at end of file
|
|
+end
|
|
--
|
|
1.8.2.1
|
|
|