jminify 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/java/yuicompressor-2.4.7.jar +0 -0
- data/lib/jminify.rb +7 -0
- data/lib/jminify/css.rb +18 -0
- data/lib/jminify/error.rb +9 -0
- data/lib/jminify/js.rb +17 -0
- metadata +59 -0
Binary file
|
data/lib/jminify.rb
ADDED
data/lib/jminify/css.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
java_import com.yahoo.platform.yui.compressor.CssCompressor
|
2
|
+
java_import java.io.FileReader
|
3
|
+
|
4
|
+
module JMinify
|
5
|
+
|
6
|
+
class CSS
|
7
|
+
def initialize(path)
|
8
|
+
@reader = FileReader.new(path)
|
9
|
+
@compressor = CssCompressor.new(@reader)
|
10
|
+
@reader.close
|
11
|
+
end
|
12
|
+
|
13
|
+
def compress(out)
|
14
|
+
@compressor.compress(out, -1)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/lib/jminify/js.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
java_import com.yahoo.platform.yui.compressor.JavaScriptCompressor
|
2
|
+
java_import java.io.FileReader
|
3
|
+
|
4
|
+
module JMinify
|
5
|
+
|
6
|
+
class JS
|
7
|
+
def initialize(path)
|
8
|
+
@reader = FileReader.new(path)
|
9
|
+
@compressor = JavaScriptCompressor.new(@reader, Error.new)
|
10
|
+
end
|
11
|
+
|
12
|
+
def compress(out)
|
13
|
+
@compressor.compress(out, -1, true, false, true, false)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jminify
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Chris Mowforth
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2012-02-22 00:00:00 Z
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: " A wrapper for the YUI Java compressor: compress JavaScript and CSS, including whitespace removal and munging of variable names.\n"
|
17
|
+
email:
|
18
|
+
- chris@mowforth.com
|
19
|
+
executables: []
|
20
|
+
|
21
|
+
extensions: []
|
22
|
+
|
23
|
+
extra_rdoc_files: []
|
24
|
+
|
25
|
+
files:
|
26
|
+
- lib/jminify.rb
|
27
|
+
- lib/java/yuicompressor-2.4.7.jar
|
28
|
+
- lib/jminify/js.rb
|
29
|
+
- lib/jminify/error.rb
|
30
|
+
- lib/jminify/css.rb
|
31
|
+
homepage: http://github.com/cmowforth/jminify
|
32
|
+
licenses: []
|
33
|
+
|
34
|
+
post_install_message:
|
35
|
+
rdoc_options: []
|
36
|
+
|
37
|
+
require_paths:
|
38
|
+
- lib
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
45
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
|
+
none: false
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: "0"
|
51
|
+
requirements: []
|
52
|
+
|
53
|
+
rubyforge_project:
|
54
|
+
rubygems_version: 1.8.9
|
55
|
+
signing_key:
|
56
|
+
specification_version: 3
|
57
|
+
summary: YUI JS / CSS compressor for JRuby.
|
58
|
+
test_files: []
|
59
|
+
|