jekyll-bookshop 2.0.0.pre.alpha.2 → 2.0.0.pre.alpha.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b78bc626f29948998b03084444ff8b55cee28959b1193c39ca7c9ef761e037a2
4
- data.tar.gz: 4ddb4263efdec585fea7664ff95fcd039010a2fe81f8a3eea3b857a423f3d9eb
3
+ metadata.gz: 7cac00131ec04e5582dc6c8f89e177a3aa306abbc5c51522f0a9175af5016249
4
+ data.tar.gz: b3b97e8005d57aaef0c5b12c813c4671e07e9336b83a17ece8888ef8347e2a59
5
5
  SHA512:
6
- metadata.gz: ee66af958a4268bd5896974c4e7063e41ca41f3e9b40f84664759fcca8605d233ec7733de00ee3a813ba1135e6d7a9a224c8f5603aca33e56fd05cba6c0e9827
7
- data.tar.gz: 00f8d7660e47594a2bbe0fd3bf2593864f34d4d69408de18c636f7f042bc798722b74a07365c58ceedb3536151bbb57e4fecf71e78dafe9f49f3738a9f4d8777
6
+ metadata.gz: 7e9706e863b2d8b1f5b5edbe00afd8f011270faae31f4b8d0db3ab8863414e66f3c30c80a7ffcc5c1de69172846f50d5ca5c6066659050acd005e8b7babb8a14
7
+ data.tar.gz: db11956432b5a16c4b27e464c2c3de3d20f1d06128e2ce15f959c056846573e2e75e4d213bd3d822eb8b5fbecc3570a1668b4bcebe39ba5f9a3b6b6d1ab1b602
@@ -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
- bookshop_locations = context['site']['bookshop_locations']&.collect do |location|
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
@@ -63,7 +60,7 @@ module JekyllBookshop
63
60
  site = context.registers[:site]
64
61
 
65
62
  bookshop_scss_files = []
66
- site.config['bookshop_locations']&.each do |location|
63
+ site.config['bookshop_base_locations']&.each do |location|
67
64
  components_loc = Pathname.new(location + "/").cleanpath.to_s
68
65
  scss_files = Dir.glob(components_loc + "/**/*.scss")&.collect do |scss_file|
69
66
  scss_file.sub!(components_loc+"/", '').sub!(".scss", '')
@@ -91,19 +88,28 @@ module JekyllBookshop
91
88
 
92
89
  # Add the paths to find bookshop's styles
93
90
  def self.open_bookshop(site)
94
- bookshop_locations = site.config['bookshop_locations']&.collect do |location|
95
- Pathname.new(location + "/").cleanpath.to_s
91
+ bookshop_base_locations = site.config['bookshop_locations']&.collect do |location|
92
+ Pathname.new("#{site.source}/#{location}/").cleanpath.to_s
96
93
  end
97
- bookshop_locations = bookshop_locations.select do |location|
94
+ bookshop_base_locations = bookshop_base_locations.select do |location|
98
95
  Dir.exist?(location)
99
96
  end
97
+ bookshop_component_locations = bookshop_base_locations&.collect do |location|
98
+ Pathname.new("#{location}/components/").cleanpath.to_s
99
+ end
100
100
 
101
101
  site.config['watch_dirs'] ||= [] # Paired with CloudCannon/jekyll-watch
102
- site.config['watch_dirs'].push(*bookshop_locations);
102
+ site.config['watch_dirs'].push(*bookshop_base_locations);
103
103
 
104
104
  site.config['sass'] ||= {}
105
105
  site.config['sass']['load_paths'] ||= []
106
- site.config['sass']['load_paths'].push(*bookshop_locations)
106
+ site.config['sass']['load_paths'].push(*bookshop_base_locations)
107
+
108
+ site.config['bookshop_base_locations'] ||= []
109
+ site.config['bookshop_base_locations'].push(*bookshop_base_locations)
110
+
111
+ site.config['bookshop_component_locations'] ||= []
112
+ site.config['bookshop_component_locations'].push(*bookshop_component_locations)
107
113
  end
108
114
  end
109
115
 
@@ -1,3 +1,3 @@
1
1
  module JekyllBookshop
2
- VERSION = "2.0.0-alpha.2"
2
+ VERSION = "2.0.0.pre.alpha.7"
3
3
  end
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.2
4
+ version: 2.0.0.pre.alpha.7
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-05-27 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll