jekyll-js-converter 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/converters/js.rb +12 -16
- data/lib/jekyll-js-converter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3266db8f045c5dfc168d25c41ae37cf094c3d6dbe8ffaa4b2ddf90547f486919
|
4
|
+
data.tar.gz: 7630aac486970cfea70a9b3f3b721973113ada5c4a2c8ad5c6e3e6c38c050977
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b23f80a19d6ab045ca681cd9ac9037dcab4fae1df175fc2f53e02a24c7be3e0d32a5e770d42cd0955c02f667d7d9254c13ff971a19f970e07471c2f245bf89cf
|
7
|
+
data.tar.gz: 1f7897defebc0406b5af04d17c63dd02a2e9535e5195575c9897862bc69004ccc20c908e72b7e4c5fb78418d28fc5ccadce686ecba6150d64afb02a9d6cf87f8
|
data/lib/jekyll/converters/js.rb
CHANGED
@@ -70,18 +70,16 @@ module Jekyll
|
|
70
70
|
|
71
71
|
def convert(content)
|
72
72
|
if generate_source_map?
|
73
|
-
config = Jekyll::Utils.
|
74
|
-
|
75
|
-
|
76
|
-
:
|
77
|
-
|
78
|
-
|
79
|
-
:filename => @page.name
|
80
|
-
}
|
73
|
+
config = Jekyll::Utils.deep_merge_hashes(
|
74
|
+
{ :uglifier => {
|
75
|
+
:source_map => {
|
76
|
+
:map_url => @source_map_page.name,
|
77
|
+
:sources_content => true,
|
78
|
+
:filename => @page.name
|
81
79
|
}
|
82
|
-
}
|
83
|
-
|
84
|
-
|
80
|
+
}
|
81
|
+
},
|
82
|
+
javascript_config
|
85
83
|
)
|
86
84
|
|
87
85
|
uglified, source_map = Uglifier.new(config[:uglifier]).compile_with_map(insert_imports(content))
|
@@ -91,11 +89,9 @@ module Jekyll
|
|
91
89
|
|
92
90
|
uglified
|
93
91
|
else
|
94
|
-
config = Jekyll::Utils.
|
95
|
-
|
96
|
-
|
97
|
-
javascript_config
|
98
|
-
)
|
92
|
+
config = Jekyll::Utils.deep_merge_hashes(
|
93
|
+
{ :uglifier => {} },
|
94
|
+
javascript_config
|
99
95
|
)
|
100
96
|
|
101
97
|
Uglifier.new(config[:uglifier]).compile(insert_imports(content))
|