jekyll_asset_pipeline 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +0 -1
- data/lib/jekyll_asset_pipeline.rb +8 -6
- data/lib/jekyll_asset_pipeline/asset.rb +2 -0
- data/lib/jekyll_asset_pipeline/compressor.rb +2 -0
- data/lib/jekyll_asset_pipeline/converter.rb +2 -0
- data/lib/jekyll_asset_pipeline/extensions/jekyll/site.rb +2 -0
- data/lib/jekyll_asset_pipeline/extensions/jekyll/site_extensions.rb +2 -0
- data/lib/jekyll_asset_pipeline/extensions/liquid/asset_tag.rb +2 -0
- data/lib/jekyll_asset_pipeline/extensions/liquid/asset_tags/css_asset_tag.rb +2 -0
- data/lib/jekyll_asset_pipeline/extensions/liquid/asset_tags/javascript_asset_tag.rb +2 -0
- data/lib/jekyll_asset_pipeline/extensions/liquid/liquid_block_extensions.rb +2 -0
- data/lib/jekyll_asset_pipeline/extensions/ruby/subclass_tracking.rb +2 -0
- data/lib/jekyll_asset_pipeline/pipeline.rb +20 -18
- data/lib/jekyll_asset_pipeline/template.rb +2 -0
- data/lib/jekyll_asset_pipeline/templates/css_tag_template.rb +2 -0
- data/lib/jekyll_asset_pipeline/templates/javascript_tag_template.rb +2 -0
- data/lib/jekyll_asset_pipeline/templates/template_helper.rb +2 -0
- data/lib/jekyll_asset_pipeline/version.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82d2ba16892bf46711e1b221cde035bdbb15c349
|
4
|
+
data.tar.gz: 51344c7bb8482dbeb8f2dfd21f59294efa37f300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c7414237dbf80476b12d7cc3bcb5ca58f26bd39dbf2f338772f2488e96c03bc394495c4714bf9740068d5c8c8df07bd0c9764add60a3c8065548642b06d7f72
|
7
|
+
data.tar.gz: dff752454d9ae738f0f65737613d293579819db308b6d73c71c9867796947e04add3e37a985f92f162624ff02065158eafad30d2d39c8da718d068b48e7d4b04
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
[![Gem Version](https://img.shields.io/gem/v/jekyll_asset_pipeline.svg)](https://rubygems.org/gems/jekyll_asset_pipeline)
|
4
4
|
[![Build Status](https://img.shields.io/travis/matthodan/jekyll-asset-pipeline.svg)](https://travis-ci.org/matthodan/jekyll-asset-pipeline)
|
5
5
|
[![Coveralls Status](https://img.shields.io/coveralls/github/matthodan/jekyll-asset-pipeline/master.svg)](https://coveralls.io/r/matthodan/jekyll-asset-pipeline?branch=master)
|
6
|
-
[![Dependency Status](https://img.shields.io/gemnasium/matthodan/jekyll-asset-pipeline.svg)](https://gemnasium.com/matthodan/jekyll-asset-pipeline)
|
7
6
|
|
8
7
|
[Jekyll Asset Pipeline](http://www.matthodan.com/2012/11/22/jekyll-asset-pipeline.html) is a powerful asset pipeline that automatically collects, converts and compresses / minifies your site's JavaScript and CSS assets when you compile your [Jekyll](http://jekyllrb.com/) site.
|
9
8
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Stdlib dependencies
|
2
4
|
require 'digest/md5'
|
3
5
|
require 'fileutils'
|
@@ -47,11 +49,11 @@ module JekyllAssetPipeline
|
|
47
49
|
# 'gzip' true = Create gzip versions,
|
48
50
|
# false = Do not create gzip versions
|
49
51
|
DEFAULTS = {
|
50
|
-
'output_path'
|
51
|
-
'display_path'
|
52
|
-
'staging_path'
|
53
|
-
'bundle'
|
54
|
-
'compress'
|
55
|
-
'gzip'
|
52
|
+
'output_path' => 'assets',
|
53
|
+
'display_path' => nil,
|
54
|
+
'staging_path' => '.asset_pipeline',
|
55
|
+
'bundle' => true,
|
56
|
+
'compress' => true,
|
57
|
+
'gzip' => false
|
56
58
|
}.freeze
|
57
59
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module JekyllAssetPipeline
|
2
4
|
# The pipeline itself, the run method is where it all happens
|
3
5
|
# rubocop:disable ClassLength
|
@@ -11,9 +13,9 @@ module JekyllAssetPipeline
|
|
11
13
|
Digest::MD5.hexdigest(YAML.safe_load(manifest).map! do |path|
|
12
14
|
"#{path}#{File.mtime(File.join(source, path)).to_i}"
|
13
15
|
end.join.concat(options.to_s))
|
14
|
-
rescue StandardError =>
|
15
|
-
puts "Failed to generate hash from provided manifest: #{
|
16
|
-
raise
|
16
|
+
rescue StandardError => e
|
17
|
+
puts "Failed to generate hash from provided manifest: #{e.message}"
|
18
|
+
raise e
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|
@@ -34,12 +36,12 @@ module JekyllAssetPipeline
|
|
34
36
|
puts "Processing '#{tag}' manifest '#{prefix}'"
|
35
37
|
pipeline = new(manifest, prefix, source, destination, type, config)
|
36
38
|
process_pipeline(hash, pipeline)
|
37
|
-
rescue StandardError =>
|
39
|
+
rescue StandardError => e
|
38
40
|
# Add exception to cache
|
39
|
-
cache[hash] =
|
41
|
+
cache[hash] = e
|
40
42
|
|
41
43
|
# Re-raise the exception
|
42
|
-
raise
|
44
|
+
raise e
|
43
45
|
end
|
44
46
|
end
|
45
47
|
|
@@ -119,10 +121,10 @@ module JekyllAssetPipeline
|
|
119
121
|
File.dirname(full_path))
|
120
122
|
end
|
121
123
|
end
|
122
|
-
rescue StandardError =>
|
124
|
+
rescue StandardError => e
|
123
125
|
puts 'Asset Pipeline: Failed to load assets from provided ' \
|
124
|
-
"manifest: #{
|
125
|
-
raise
|
126
|
+
"manifest: #{e.message}"
|
127
|
+
raise e
|
126
128
|
end
|
127
129
|
|
128
130
|
# Convert assets based on the file extension if converter is defined
|
@@ -157,10 +159,10 @@ module JekyllAssetPipeline
|
|
157
159
|
if File.extname(asset.filename) == ''
|
158
160
|
asset.filename = "#{asset.filename}#{@type}"
|
159
161
|
end
|
160
|
-
rescue StandardError =>
|
162
|
+
rescue StandardError => e
|
161
163
|
puts "Asset Pipeline: Failed to convert '#{asset.filename}' " \
|
162
|
-
"with '#{klass}': #{
|
163
|
-
raise
|
164
|
+
"with '#{klass}': #{e.message}"
|
165
|
+
raise e
|
164
166
|
end
|
165
167
|
|
166
168
|
# Bundle multiple assets into a single asset
|
@@ -185,10 +187,10 @@ module JekyllAssetPipeline
|
|
185
187
|
|
186
188
|
begin
|
187
189
|
asset.content = klass.new(asset.content).compressed
|
188
|
-
rescue StandardError =>
|
190
|
+
rescue StandardError => e
|
189
191
|
puts "Asset Pipeline: Failed to compress '#{asset.filename}' " \
|
190
|
-
"with '#{klass}': #{
|
191
|
-
raise
|
192
|
+
"with '#{klass}': #{e.message}"
|
193
|
+
raise e
|
192
194
|
end
|
193
195
|
end
|
194
196
|
end
|
@@ -227,10 +229,10 @@ module JekyllAssetPipeline
|
|
227
229
|
File.open(File.join(directory, asset.filename), 'w') do |file|
|
228
230
|
file.write(asset.content)
|
229
231
|
end
|
230
|
-
rescue StandardError =>
|
232
|
+
rescue StandardError => e
|
231
233
|
puts "Asset Pipeline: Failed to save '#{asset.filename}' to " \
|
232
|
-
"disk: #{
|
233
|
-
raise
|
234
|
+
"disk: #{e.message}"
|
235
|
+
raise e
|
234
236
|
end
|
235
237
|
end
|
236
238
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_asset_pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Hodan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
requirements:
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version: 2.
|
113
|
+
version: 2.3.0
|
114
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - ">="
|