jekyll-js-converter 1.0.1 → 1.1.0
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 +5 -4
- data/lib/jekyll/core_ext/hash.rb +12 -0
- data/lib/jekyll-js-converter/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46e4f09c7076cad7fb5dfc7c811e826cce1ad8358db66f3bb3e99a85577ca4ab
|
4
|
+
data.tar.gz: cc313145326fd00006785f91df5f3fd7277c5f97b5fba35e2fe8e66edc50ce97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3c7dfac1fd68634f4e0a6ade3a6429127e9e183a752e2f06a0cec311c989fecb82d14c6d4c0a3df5840131000e4ca68b51f672d2acbe5f082e66cc51aeb66ef
|
7
|
+
data.tar.gz: fe2e8bd2d8a2b7cbccfbd7d2f03d3ed38951268fafc5131d18a4688f284cdce9e87e030920660fb23ff2722788e888443a0f0aca42eb4e39ec21dccaee26f20a
|
data/lib/jekyll/converters/js.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'uglifier'
|
2
2
|
require 'jekyll/js_source_map_page'
|
3
|
+
require 'jekyll/core_ext/hash'
|
3
4
|
|
4
5
|
module Jekyll
|
5
6
|
module Converters
|
@@ -21,17 +22,17 @@ module Jekyll
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def javascript_config
|
24
|
-
@javascript_config ||= @config['javascript'] || {}
|
25
|
+
@javascript_config ||= @config['javascript'].deep_symbolize_keys || {}
|
25
26
|
end
|
26
27
|
|
27
28
|
def javascript_dir
|
28
|
-
javascript_config[
|
29
|
+
javascript_config[:javascript_dir].to_s.empty? ? '_javascript' : javascript_config[:javascript_dir]
|
29
30
|
end
|
30
31
|
|
31
32
|
def load_paths
|
32
33
|
@load_paths ||= begin
|
33
34
|
paths = [Jekyll.sanitized_path(site.source, javascript_dir)]
|
34
|
-
paths += javascript_config[
|
35
|
+
paths += javascript_config[:load_paths].map { |load_path| File.expand_path(load_path, site.source) } rescue []
|
35
36
|
|
36
37
|
if safe?
|
37
38
|
paths.map! { |path| Jekyll.sanitized_path(site.source, path) }
|
@@ -155,7 +156,7 @@ module Jekyll
|
|
155
156
|
end
|
156
157
|
|
157
158
|
def source_map_option
|
158
|
-
javascript_config.fetch(
|
159
|
+
javascript_config.fetch(:source_map, :always).to_sym
|
159
160
|
end
|
160
161
|
end
|
161
162
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-js-converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Susco
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/jekyll-js-converter.rb
|
90
90
|
- lib/jekyll-js-converter/version.rb
|
91
91
|
- lib/jekyll/converters/js.rb
|
92
|
+
- lib/jekyll/core_ext/hash.rb
|
92
93
|
- lib/jekyll/js_source_map_page.rb
|
93
94
|
homepage: https://github.com/dsusco/jekyll-js-converter
|
94
95
|
licenses:
|
@@ -102,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
103
|
requirements:
|
103
104
|
- - ">="
|
104
105
|
- !ruby/object:Gem::Version
|
105
|
-
version: 2.
|
106
|
+
version: 2.5.0
|
106
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
108
|
requirements:
|
108
109
|
- - ">="
|