jekyll_patternbot 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82f8b059936643c58415f90f6470c2405dd73e79b3089dafa034d671621035cd
4
- data.tar.gz: efa04e422afaecbdacd75a7fc176db63602ef4fa82d04064f5a825161bcb9b2a
3
+ metadata.gz: 290cf39f418238dd85d67c792bafb1b97bf2095850420c398c1d780627bd887f
4
+ data.tar.gz: 3f604ab155d22c2dfde02c71e6bf5bfa81935aaa1bc594098d3632b727725bdc
5
5
  SHA512:
6
- metadata.gz: 468ba36e3ce045f90f76609be33324178e6a62b6da575aa705744be686bedbf86a272c377d72369fa13586720a3c17a4c215a212c175a54b41436cbe0f7ad0ce
7
- data.tar.gz: 8a1b724e6ea115ce536c2a21f44cc59e805f1c069b926b8e331331fe43cecac2ec09639f7a5d7c3e0c076ecbe98a41259bd15c8766fcb7100536570b75175fe6
6
+ metadata.gz: 4061d32dbcdac18f98ecdc68554b98418032b7387a1f1509f67bd1052bb30e8ec027465884b63314dfb05158dfa1b8a6832ce22e5fb0b550a7ea152cb93abd0c
7
+ data.tar.gz: 4ecdbd2c196780a7e46bf2d0f48a4c9f19d20fdd20031fa38f5865dc31eab7b033ba1e8483c203fc402051bbc7f56b06d765cec6d20add9e256b4d1e45bdf72d
data/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ Jekyll Patternbot adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ---
7
7
 
8
+ ## [0.16.0] — 2019-01-16
9
+
10
+ ### Added
11
+
12
+ - Added the ability to output the `main.js` file to the bottom of all user patterns in the library.
13
+
14
+ ### Fixed
15
+
16
+ - Prevented erroneous requests for the `theme.css` when it doesn’t exist.
17
+
18
+ ---
19
+
8
20
  ## [0.15.0] — 2019-01-16
9
21
 
10
22
  ### Fixed
data/_config.yml CHANGED
@@ -33,6 +33,7 @@ patternbot:
33
33
  source: "sample-pages"
34
34
  js:
35
35
  source: "js"
36
+ main: "main.js"
36
37
 
37
38
  title: false
38
39
  description: false
@@ -19,9 +19,9 @@
19
19
  {% else %}
20
20
  <link href="{{site.baseurl}}/assets/_patternbot/common/typografier.min.css?v={{page._PatternbotConfig.patternbot.version}}" rel="stylesheet">
21
21
  {% endif %}
22
- {% if page._PatternbotData.css.theme %}
22
+ {% unless page._PatternbotData.css.theme == empty %}
23
23
  <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.theme}}?v={{site.time | date:'%s'}}" rel="stylesheet">
24
- {% endif %}
24
+ {% endunless %}
25
25
  <link href="{{site.baseurl}}/assets/_patternbot/common/common.min.css?v={{page._PatternbotConfig.patternbot.version}}" rel="stylesheet">
26
26
  {% for css in page._pattern_data.config._extra_css %}
27
27
  <link href="{{site.baseurl}}/assets/_patternbot/patterns/{{css}}?v={{page._PatternbotConfig.patternbot.version}}" rel="stylesheet">
@@ -4,7 +4,9 @@
4
4
  <meta charset="utf-8">
5
5
  <title>{{page.title}}</title>
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1">
7
- <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.main}}?v={{site.time | date:'%s'}}" rel="stylesheet">
7
+ {% if page._PatternbotData.css.main %}
8
+ <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.css.source}}/{{page._PatternbotConfig.patternbot.css.main}}?v={{site.time | date:'%s'}}" rel="stylesheet">
9
+ {% endif %}
8
10
  {% if page._subpattern_data.background %}
9
11
  <style>
10
12
  html {
@@ -23,5 +25,9 @@
23
25
  <script src="{{site.baseurl}}/assets/_patternbot/vendor/clipboard.min.js?v={{page._PatternbotConfig.patternbot.version}}"></script>
24
26
  {% include patternbot_pattern_copy_script.html %}
25
27
 
28
+ {% if page._PatternbotData.js.main %}
29
+ <link href="{{site.baseurl}}/{{page._PatternbotConfig.patternbot.js.source}}/{{page._PatternbotConfig.patternbot.js.main}}?v={{site.time | date:'%s'}}" rel="stylesheet">
30
+ {% endif %}
31
+
26
32
  </body>
27
33
  </html>
@@ -3,6 +3,7 @@ module JekyllPatternbot
3
3
  PatternbotCache = {}
4
4
  PatternbotData = {
5
5
  :css => {},
6
+ :js => {},
6
7
  :logos => false,
7
8
  :icons => false,
8
9
  :patterns => {},
@@ -37,6 +38,18 @@ module JekyllPatternbot
37
38
  PatternbotData[:icons] = []
38
39
  end
39
40
 
41
+ if File.exists? File.expand_path(Config['patternbot']['css']['main'], Config['patternbot']['css']['source'])
42
+ PatternbotData[:css][:main] = true
43
+ else
44
+ PatternbotData[:css][:main] = false
45
+ end
46
+
47
+ if File.exists? File.expand_path(Config['patternbot']['js']['main'], Config['patternbot']['js']['source'])
48
+ PatternbotData[:js][:main] = true
49
+ else
50
+ PatternbotData[:js][:main] = false
51
+ end
52
+
40
53
  pattern_files = PatternsFinder.new
41
54
  PatternbotData[:patterns] = {
42
55
  :internal => pattern_files.internal_patterns_info,
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module JekyllPatternbot
2
- VERSION = '0.15.0'
2
+ VERSION = '0.16.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_patternbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas J Bradley