Module: Squoosh
- Defined in:
- lib/squoosh.rb,
lib/squoosh/version.rb
Overview
Minify HTML, JavaScript, and CSS.
Examples
html = <<-EOF
<!DOCTYPE html>
<html>
<head>
<!-- Set the title -->
<title>My fancy title!</title>
</head>
<body>
<p>Two</p>
<p>paragraphs.</p>
</body>
</html>
EOF
compressed = Squoosh.minify_html(html)
# "<!DOCTYPE html><title>My fancy title!</title><p>Two<p>paragraphs."
Defined Under Namespace
Classes: Squoosher
Constant Summary collapse
- VERSION =
The version of squoosh.
'0.4.1'
Class Method Summary collapse
-
.minify_css(content, options = {}) ⇒ String
Minify CSS convenience method.
-
.minify_html(content, options = {}) ⇒ String
Minify HTML convenience method.
-
.minify_js(content, options = {}) ⇒ String
Minify JavaScript convenience method.
Class Method Details
.minify_css(content, options = {}) ⇒ String
Minify CSS convenience method.
682 683 684 |
# File 'lib/squoosh.rb', line 682 def self.minify_css(content, = {}) Squoosher.new().minify_css content end |
.minify_html(content, options = {}) ⇒ String
Minify HTML convenience method.
673 674 675 |
# File 'lib/squoosh.rb', line 673 def self.minify_html(content, = {}) Squoosher.new().minify_html content end |