jekyll-bookshop 2.0.0.pre.alpha.0 → 2.0.0.pre.alpha.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-bookshop.rb +21 -10
- data/lib/jekyll-bookshop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e92ee512a6bc33f0b3bd8559a05d6b60302c0e11c22a14c6f89ec001121a05db
|
4
|
+
data.tar.gz: 1c05f39bea2e59713a16c54f03d8ebe63a9c37bbeb8546a0da41342a51011360
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8f34bf13c9ab929a66fb53f09d4f79efc8384b10fb27b466fb6c7fde6f38a418be50eb67c07029bf61c5c1d01cb41684996af8e52120af18d361c2eb5f5b4e2
|
7
|
+
data.tar.gz: 4bed403b8d80a9ec62ac56e69cf8e405f9da6a654b942813d3f2ba4d5c0b7bb16e3b937493b843f44dc7040947a23e34097d6556b861ee581c6d6c4039e3fe60
|
data/lib/jekyll-bookshop.rb
CHANGED
@@ -6,10 +6,7 @@ module JekyllBookshop
|
|
6
6
|
|
7
7
|
# Look for includes in the built bookshop directory
|
8
8
|
def tag_includes_dirs(context)
|
9
|
-
|
10
|
-
Pathname.new(location + "/components").cleanpath.to_s
|
11
|
-
end
|
12
|
-
bookshop_locations.freeze
|
9
|
+
context['site']['bookshop_component_locations'].freeze
|
13
10
|
end
|
14
11
|
|
15
12
|
# Support the bind syntax, spreading an object into params
|
@@ -76,9 +73,11 @@ module JekyllBookshop
|
|
76
73
|
end
|
77
74
|
|
78
75
|
output_css = if Jekyll.env == "production"
|
79
|
-
bookshop_scss_files.join("")
|
76
|
+
bookshop_scss_files.join("\n")
|
80
77
|
else
|
81
|
-
|
78
|
+
"html:not([data-bookshop-hmr]) {
|
79
|
+
#{bookshop_scss_files.join("\n")}
|
80
|
+
}"
|
82
81
|
end
|
83
82
|
|
84
83
|
output_css
|
@@ -89,16 +88,28 @@ module JekyllBookshop
|
|
89
88
|
|
90
89
|
# Add the paths to find bookshop's styles
|
91
90
|
def self.open_bookshop(site)
|
92
|
-
|
93
|
-
Pathname.new(location
|
91
|
+
base_bookshop_locations = site.config['bookshop_locations']&.collect do |location|
|
92
|
+
Pathname.new("#{site.source}/#{location}/").cleanpath.to_s
|
93
|
+
end
|
94
|
+
base_bookshop_locations = base_bookshop_locations.select do |location|
|
95
|
+
Dir.exist?(location)
|
96
|
+
end
|
97
|
+
bookshop_component_locations = base_bookshop_locations&.collect do |location|
|
98
|
+
Pathname.new("#{location}/components/").cleanpath.to_s
|
94
99
|
end
|
95
100
|
|
96
101
|
site.config['watch_dirs'] ||= [] # Paired with CloudCannon/jekyll-watch
|
97
|
-
site.config['watch_dirs'].push(*
|
102
|
+
site.config['watch_dirs'].push(*base_bookshop_locations);
|
98
103
|
|
99
104
|
site.config['sass'] ||= {}
|
100
105
|
site.config['sass']['load_paths'] ||= []
|
101
|
-
site.config['sass']['load_paths'].push(*
|
106
|
+
site.config['sass']['load_paths'].push(*base_bookshop_locations)
|
107
|
+
|
108
|
+
site.config['bookshop_locations'] = []
|
109
|
+
site.config['bookshop_locations'].push(*base_bookshop_locations)
|
110
|
+
|
111
|
+
site.config['bookshop_component_locations'] ||= []
|
112
|
+
site.config['bookshop_component_locations'].push(*bookshop_component_locations)
|
102
113
|
end
|
103
114
|
end
|
104
115
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-bookshop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.alpha.
|
4
|
+
version: 2.0.0.pre.alpha.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liam Bigelow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|