jekyll-minifier 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-minifier.rb +21 -18
- data/lib/jekyll-minifier/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff6d2a89257973d72fae0cd41b0b5d9eb23fd022
|
4
|
+
data.tar.gz: 716a3828f3f9362d9b1bd3f1b7dcf39339ee3a54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b621dd8a6dbec41cc46ea8899e3939435d05473a622d22b91b9f681312759a5210df9fd69112892938bddd3f90f387617b75de72da7e44054855cf4c50c050e
|
7
|
+
data.tar.gz: 063041809ac244737f5d0cc7f3f6c4c0cdcb1086916ec3cdcb1afe865680dfde6d8c5764929fdd4f431a2f6f8704f37134b113df016ec0bbce1dbe1196aaa7c5
|
data/lib/jekyll-minifier.rb
CHANGED
@@ -76,7 +76,7 @@ module Jekyll
|
|
76
76
|
|
77
77
|
class StaticFile
|
78
78
|
include Compressor
|
79
|
-
|
79
|
+
|
80
80
|
def copy_file(path, dest_path)
|
81
81
|
FileUtils.mkdir_p(File.dirname(dest_path))
|
82
82
|
FileUtils.cp(path, dest_path)
|
@@ -88,26 +88,29 @@ module Jekyll
|
|
88
88
|
return false if File.exist?(dest_path) and !modified?
|
89
89
|
@@mtimes[path] = mtime
|
90
90
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
91
|
+
if exclude?(dest, dest_path)
|
92
|
+
copy_file(path, dest_path)
|
93
|
+
else
|
94
|
+
case File.extname(dest_path)
|
95
|
+
when '.js'
|
96
|
+
if dest_path =~ /.min.js$/
|
97
|
+
copy_file(path, dest_path)
|
98
|
+
else
|
99
|
+
output_js(dest_path, File.read(path))
|
100
|
+
end
|
101
|
+
when '.css'
|
102
|
+
if dest_path =~ /.min.css$/
|
103
|
+
copy_file(path, dest_path)
|
104
|
+
else
|
105
|
+
output_css(dest_path, File.read(path))
|
106
|
+
end
|
107
|
+
when '.xml'
|
108
|
+
output_html(dest_path, File.read(path))
|
95
109
|
else
|
96
|
-
output_js(dest_path, File.read(path))
|
97
|
-
end
|
98
|
-
when '.css'
|
99
|
-
if dest_path =~ /.min.css$/
|
100
110
|
copy_file(path, dest_path)
|
101
|
-
|
102
|
-
output_css(dest_path, File.read(path))
|
103
|
-
end
|
104
|
-
when '.xml'
|
105
|
-
output_html(dest_path, File.read(path))
|
106
|
-
else
|
107
|
-
copy_file(path, dest_path)
|
111
|
+
end
|
108
112
|
end
|
109
|
-
|
110
113
|
true
|
111
114
|
end
|
112
115
|
end
|
113
|
-
end
|
116
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-minifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DigitalSparky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|