Skip to content

Commit

Permalink
added minification of js
Browse files Browse the repository at this point in the history
  • Loading branch information
jhollingworth committed Apr 9, 2012
1 parent cd43b96 commit 513653c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
21 changes: 21 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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
16 changes: 13 additions & 3 deletions RakeFile
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.2
1 change: 1 addition & 0 deletions dist/bootstrap-wysihtml5-0.0.2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/bootstrap-wysihtml5.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"lists": true,
"html": false,
"link": true,
"image": false,
"image": true,
events: {},
parserRules: {
tags: {
Expand Down

0 comments on commit 513653c

Please sign in to comment.