jekyll-assets 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/jekyll/assets.rb +2 -1
- data/lib/jekyll/assets/default.rb +1 -0
- data/lib/jekyll/assets/drop.rb +1 -1
- data/lib/jekyll/assets/extensible.rb +16 -1
- data/lib/jekyll/assets/plugins/html/defaults/audio.rb +1 -0
- data/lib/jekyll/assets/plugins/html/defaults/component.rb +1 -0
- data/lib/jekyll/assets/plugins/html/defaults/css.rb +2 -1
- data/lib/jekyll/assets/plugins/html/defaults/favicon.rb +1 -0
- data/lib/jekyll/assets/plugins/html/defaults/img.rb +2 -1
- data/lib/jekyll/assets/plugins/html/defaults/js.rb +2 -1
- data/lib/jekyll/assets/plugins/html/defaults/vid.rb +1 -0
- data/lib/jekyll/assets/plugins/html/img.rb +1 -1
- data/lib/jekyll/assets/proxy.rb +1 -2
- data/lib/jekyll/assets/tag.rb +0 -1
- data/lib/jekyll/assets/version.rb +1 -1
- metadata +2 -3
- data/lib/jekyll/assets/plugins/closure_comments.rb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b782c8280d7d3a50234be8ed6923a652fd4fc64a9d48a73c0a6149ba488233ad
|
4
|
+
data.tar.gz: c3ee8170a33b679ff744325d5a2edde5fb28185cb54ebf8b804e24990a1dd4a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 988839d356b82ff5487241eda8889fbb7cdcfc510f58369b41af37af503500099e1bd359a3f4909e13388804140294474c026080e2340bd3352c825ffb238276
|
7
|
+
data.tar.gz: e4e3b85799a51f19575f1532c93f4871f47eea6121ae05b20dab5f2d3c0b79a3f04ca5b76b17d29d7959fc1fb24ce8a21d9eb2ba0b7c3bc9f60ccb8d30c71f28
|
data/README.md
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
![Gem Version](https://img.shields.io/gem/v/jekyll-assets.svg?style=for-the-badge)
|
6
6
|
![Gem DL](https://img.shields.io/gem/dt/jekyll-assets.svg?style=for-the-badge)
|
7
7
|
|
8
|
+
***Looking for information on what's changed? See https://envygeeks.io/2017/11/21/jekyll-assets-3-released***
|
9
|
+
|
8
10
|
# Jekyll Assets
|
9
11
|
|
10
12
|
Jekyll Assets is a drop in [asset pipeline](http://guides.rubyonrails.org/asset_pipeline.html) that uses [Sprockets](https://github.com/rails/sprockets) to build specifically for Jekyll. It utilizes [Sprockets](https://github.com/rails/sprockets), and [Jekyll](https://jekyllrb.com) to try and achieve a clean, and extensible assets platform that supports plugins, caching, converting your assets. It even supports proxying of said assets in a way that does not interfere with either [Sprockets](https://github.com/rails/sprockets), or [Jekyll](https://jekyllrb.com), or your own source. By default you can add Jekyll Assets to your Gemfile, as a plugin, and have it act as a drop-in replacement for Jekyll's basic SASS processors, with you only having to add it to your Gemfile, and updating your `<img>`, and `<link>`.
|
data/lib/jekyll/assets.rb
CHANGED
@@ -17,6 +17,7 @@ def require_all(*globs)
|
|
17
17
|
end }
|
18
18
|
end
|
19
19
|
|
20
|
+
# --
|
20
21
|
require_relative "assets/env"
|
21
22
|
Jekyll::Hooks.register :site, :post_read, priority: 99 do |o|
|
22
23
|
unless o.sprockets
|
@@ -30,6 +31,6 @@ end
|
|
30
31
|
# stuff block and be done just incase something else relies
|
31
32
|
# on our stuff to do their stuff. Such as reloaders.
|
32
33
|
# --
|
33
|
-
Jekyll::Hooks.register :site, :
|
34
|
+
Jekyll::Hooks.register :site, :post_write, priority: 99 do |o|
|
34
35
|
o&.sprockets&.write_all
|
35
36
|
end
|
data/lib/jekyll/assets/drop.rb
CHANGED
@@ -41,6 +41,20 @@ module Jekyll
|
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
44
|
+
# --
|
45
|
+
def self.internal!
|
46
|
+
if name.start_with?("Jekyll::Assets")
|
47
|
+
requirements[:internal] = true
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# --
|
52
|
+
def self.internal?
|
53
|
+
requirements[
|
54
|
+
:internal
|
55
|
+
]
|
56
|
+
end
|
57
|
+
|
44
58
|
# --
|
45
59
|
# @note a type is a "content type"
|
46
60
|
# Allows you to use types to determine if this class fits.
|
@@ -73,7 +87,8 @@ module Jekyll
|
|
73
87
|
# can limit your surface for an extensible plugin. For
|
74
88
|
# example if you only work for
|
75
89
|
# --
|
76
|
-
[%i(
|
90
|
+
m = [%i(content_types types), %i(arg_keys args)]
|
91
|
+
m.each do |(k, v)|
|
77
92
|
instance_eval <<-RUBY
|
78
93
|
def self.#{k}(*a)
|
79
94
|
requirements[:#{v}].concat(a)
|
data/lib/jekyll/assets/proxy.rb
CHANGED
data/lib/jekyll/assets/tag.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordon Bedwell
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-01-
|
13
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: execjs
|
@@ -225,7 +225,6 @@ files:
|
|
225
225
|
- lib/jekyll/assets/patches/site.rb
|
226
226
|
- lib/jekyll/assets/plugins.rb
|
227
227
|
- lib/jekyll/assets/plugins/bootstrap.rb
|
228
|
-
- lib/jekyll/assets/plugins/closure_comments.rb
|
229
228
|
- lib/jekyll/assets/plugins/font-awesome.rb
|
230
229
|
- lib/jekyll/assets/plugins/frontmatter.rb
|
231
230
|
- lib/jekyll/assets/plugins/html/audio.rb
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# Frozen-string-literal: true
|
2
|
-
# Copyright: 2012 - 2018 - MIT License
|
3
|
-
# Encoding: utf-8
|
4
|
-
|
5
|
-
module Jekyll
|
6
|
-
module Assets
|
7
|
-
module Plugins
|
8
|
-
module ClosureComments
|
9
|
-
def self.call(input)
|
10
|
-
theregex = %r!/\*(\W+@alternat(e|ive)\W+)\*/!
|
11
|
-
input[:data].gsub!(theregex, "/*!\\1*/")
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
# --
|
16
|
-
%w(text/css text/scss text/sass).each do |v|
|
17
|
-
Sprockets.register_preprocessor v, ClosureComments
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
# --
|
24
|
-
Jekyll::Assets::Hook.register :asset, :before_write do |v|
|
25
|
-
theregex = %r!/\*\!(\W+@alternat(e|ive)\W+)\*/;?!
|
26
|
-
|
27
|
-
if v.content_type == "text/css"
|
28
|
-
src = v.to_s.gsub(theregex, "/*\\1*/")
|
29
|
-
v.metadata[:digest] = Sprockets::DigestUtils.digest(src)
|
30
|
-
v.instance_variable_set(:@source, src)
|
31
|
-
end
|
32
|
-
end
|