Skip to content

Commit

Permalink
[ORG-1674] Migrated from html_press to htmlcompressor and corrected .…
Browse files Browse the repository at this point in the history
…awestruct_ignore-s a bit.
  • Loading branch information
unibrew committed May 22, 2013
1 parent 7c1b248 commit 858a2c3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .awestruct_ignore
@@ -1 +1,4 @@
README.md
CONTRIBUTING.md
Gemfile*
Rakefile
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -3,7 +3,6 @@ source 'https://rubygems.org'
gem 'awestruct', '~> 0.5.0' # Framework for creating static HTML sites
gem 'uglifier', '~> 2.0.1' # Ruby wrapper for UglifyJS JavaScript compressor
gem 'cssminify', '~> 1.0.2' # CSS compression using YUI compressor
gem 'html_press', '~> 0.8.1' # Compressing HTML
gem 'less', '~> 2.3.2' # Invoke the Less CSS compiler from Ruby
gem 'therubyracer', '~> 0.11.4', :platforms => :ruby # Call JavaScript code and manipulate JavaScript objects from Ruby and vice versa
gem 'rb-fsevent', '~> 0.9.3' # FSEvents API with Signals catching (without RubyCocoa)
Expand Down
14 changes: 0 additions & 14 deletions Gemfile.lock
Expand Up @@ -28,35 +28,22 @@ GEM
sass (~> 3.1)
compass-960-plugin (0.10.4)
compass (>= 0.10.0)
css_press (0.3.2)
csspool-st (= 3.1.2)
json
cssminify (1.0.2)
csspool-st (3.1.2)
execjs (1.4.0)
multi_json (~> 1.0)
fssm (0.2.10)
git (1.2.5)
haml (4.0.2)
tilt
html_press (0.8.1)
htmlentities
multi_css (>= 0.1.0)
multi_js
htmlcompressor (0.0.6)
yui-compressor (~> 0.9.6)
htmlentities (4.3.1)
json (1.7.7)
kramdown (1.0.2)
less (2.3.2)
commonjs (~> 0.2.6)
libv8 (3.11.8.17)
listen (0.7.3)
mime-types (1.23)
multi_css (0.1.0)
css_press
multi_js (0.0.1)
uglifier
multi_json (1.7.3)
nokogiri (1.5.9)
open4 (1.3.0)
Expand All @@ -83,7 +70,6 @@ PLATFORMS
DEPENDENCIES
awestruct (~> 0.5.0)
cssminify (~> 1.0.2)
html_press (~> 0.8.1)
htmlcompressor (~> 0.0.3)
kramdown (~> 1.0.1)
less (~> 2.3.2)
Expand Down
6 changes: 3 additions & 3 deletions _config/site.yml
Expand Up @@ -2,9 +2,9 @@
title: JBoss Community

# Default minify settings
css_minifier: disabled
js_minifier: disabled
html_minifier: disabled
css_minifier: enabled
js_minifier: enabled
html_minifier: enabled

# Merge multiple JavaScript files to improve performance
fileMerger:
Expand Down
5 changes: 3 additions & 2 deletions _ext/html_minifier.rb
@@ -1,4 +1,4 @@
require 'html_press'
require 'htmlcompressor'

##
#
Expand Down Expand Up @@ -45,7 +45,8 @@ def transform(site, page, input)
ext_txt = ext[1..-1]
if ext_txt == "html"
print "Minifying html #{page.output_path} \n"
input = HtmlPress.compress(input)
compressor = HtmlCompressor::Compressor.new
input = compressor.compress(input)
end
end

Expand Down

0 comments on commit 858a2c3

Please sign in to comment.