Permalink
Browse files

added minification of js

  • Loading branch information...
1 parent cd43b96 commit 513653c469206434e484c36f2b33c269d59a88d3 @jhollingworth committed Apr 9, 2012
Showing with 37 additions and 4 deletions.
  1. +21 −0 Gemfile.lock
  2. +13 −3 RakeFile
  3. +1 −0 VERSION
  4. +1 −0 dist/bootstrap-wysihtml5-0.0.2.min.js
  5. +1 −1 src/bootstrap-wysihtml5.js
View
@@ -0,0 +1,21 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ execjs (1.3.0)
+ multi_json (~> 1.0)
+ libv8 (3.3.10.4)
+ multi_json (1.1.0)
+ rake (0.9.2.2)
+ therubyracer (0.9.10)
+ libv8 (~> 3.3.10)
+ uglifier (1.2.3)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rake
+ therubyracer
+ uglifier
View
@@ -1,15 +1,25 @@
require 'rubygems'
require 'bundler'
+require 'fileutils'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
+
+ROOT = File.dirname(__FILE__)
+
require 'rake'
+require 'uglifier'
+task :minify do
+ version = File.open(File.join(ROOT, 'VERSION')).read
+ output_path = File.join(ROOT, "dist")
-task :compress do
-
-end
+ minified_js = Uglifier.compile(File.read(File.join('src', 'bootstrap-wysihtml5.js')))
+ minified_js_path = File.join(output_path, "bootstrap-wysihtml5-#{version}.min.js")
+
+ File.open(minified_js_path, 'w') { |f| f.write(minified_js) }
+end
View
@@ -0,0 +1 @@
+0.0.2

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -82,7 +82,7 @@
"lists": true,
"html": false,
"link": true,
- "image": false,
+ "image": true,
events: {},
parserRules: {
tags: {

0 comments on commit 513653c

Please sign in to comment.