jekyll-assets 3.0.5 → 3.0.6

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.
Files changed (64) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +2 -1
  3. data/LICENSE +1 -1
  4. data/README.md +136 -149
  5. data/Rakefile +37 -5
  6. data/lib/jekyll-assets.rb +1 -1
  7. data/lib/jekyll/assets.rb +14 -3
  8. data/lib/jekyll/assets/config.rb +1 -1
  9. data/lib/jekyll/assets/context.rb +1 -1
  10. data/lib/jekyll/assets/default.rb +1 -1
  11. data/lib/jekyll/assets/drop.rb +1 -1
  12. data/lib/jekyll/assets/env.rb +52 -19
  13. data/lib/jekyll/assets/extensible.rb +1 -1
  14. data/lib/jekyll/assets/filters.rb +1 -1
  15. data/lib/jekyll/assets/hook.rb +31 -3
  16. data/lib/jekyll/assets/html.rb +1 -1
  17. data/lib/jekyll/assets/logger.rb +52 -10
  18. data/lib/jekyll/assets/manifest.rb +1 -1
  19. data/lib/jekyll/assets/map.rb +2 -2
  20. data/lib/jekyll/assets/map/css.rb +1 -1
  21. data/lib/jekyll/assets/map/javascript.rb +1 -1
  22. data/lib/jekyll/assets/map/writer.rb +2 -2
  23. data/lib/jekyll/assets/patches/asset.rb +1 -1
  24. data/lib/jekyll/assets/patches/cached.rb +4 -4
  25. data/lib/jekyll/assets/patches/find_asset.rb +1 -1
  26. data/lib/jekyll/assets/patches/functions.rb +1 -1
  27. data/lib/jekyll/assets/patches/obsolete.rb +1 -1
  28. data/lib/jekyll/assets/patches/site.rb +1 -1
  29. data/lib/jekyll/assets/plugins.rb +1 -1
  30. data/lib/jekyll/assets/plugins/bootstrap.rb +3 -3
  31. data/lib/jekyll/assets/plugins/closure_comments.rb +32 -0
  32. data/lib/jekyll/assets/plugins/font-awesome.rb +2 -2
  33. data/lib/jekyll/assets/plugins/frontmatter.rb +1 -1
  34. data/lib/jekyll/assets/plugins/html/audio.rb +1 -1
  35. data/lib/jekyll/assets/plugins/html/component.rb +1 -1
  36. data/lib/jekyll/assets/plugins/html/css.rb +1 -1
  37. data/lib/jekyll/assets/plugins/html/defaults/audio.rb +1 -1
  38. data/lib/jekyll/assets/plugins/html/defaults/component.rb +1 -1
  39. data/lib/jekyll/assets/plugins/html/defaults/css.rb +1 -1
  40. data/lib/jekyll/assets/plugins/html/defaults/favicon.rb +1 -1
  41. data/lib/jekyll/assets/plugins/html/defaults/img.rb +2 -2
  42. data/lib/jekyll/assets/plugins/html/defaults/js.rb +1 -1
  43. data/lib/jekyll/assets/plugins/html/defaults/vid.rb +1 -1
  44. data/lib/jekyll/assets/plugins/html/favicon.rb +1 -1
  45. data/lib/jekyll/assets/plugins/html/img.rb +2 -2
  46. data/lib/jekyll/assets/plugins/html/js.rb +1 -1
  47. data/lib/jekyll/assets/plugins/html/pic.rb +1 -1
  48. data/lib/jekyll/assets/plugins/html/svg.rb +1 -1
  49. data/lib/jekyll/assets/plugins/html/vid.rb +1 -1
  50. data/lib/jekyll/assets/plugins/liquid.rb +1 -1
  51. data/lib/jekyll/assets/plugins/magick.rb +2 -2
  52. data/lib/jekyll/assets/plugins/optim.rb +2 -2
  53. data/lib/jekyll/assets/plugins/prefixer.rb +2 -2
  54. data/lib/jekyll/assets/plugins/proxy/magick.rb +1 -1
  55. data/lib/jekyll/assets/plugins/proxy/optim.rb +1 -1
  56. data/lib/jekyll/assets/plugins/searcher.rb +17 -3
  57. data/lib/jekyll/assets/proxy.rb +1 -1
  58. data/lib/jekyll/assets/reader.rb +33 -0
  59. data/lib/jekyll/assets/tag.rb +54 -13
  60. data/lib/jekyll/assets/url.rb +2 -7
  61. data/lib/jekyll/assets/utils.rb +16 -23
  62. data/lib/jekyll/assets/version.rb +2 -2
  63. data/lib/jekyll/assets/writer.rb +46 -0
  64. metadata +6 -3
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "sprockets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "sprockets"
@@ -154,7 +154,7 @@ module Jekyll
154
154
  private
155
155
  def write_src!
156
156
  [asset_path, map_files].flatten.compact.uniq.each do |v|
157
- v = env.find_asset!(strip_base(v), pipeline: :source)
157
+ next unless (v = env.find_asset(strip_base(v), pipeline: :source))
158
158
  path = map_path(v.filename)
159
159
 
160
160
  write(environment.in_dest_dir(path)) do |f|
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  module Jekyll
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require_relative "../utils"
@@ -38,13 +38,13 @@ module Jekyll
38
38
  # --
39
39
  def find_asset(*)
40
40
  super.tap do |v|
41
- v.environment = self
41
+ v&.environment = self
42
42
  end
43
43
  end
44
44
 
45
45
  # --
46
- def find_asset!(*args)
47
- load(resolve!(*args).first).tap do |v|
46
+ def find_asset!(*a)
47
+ load(resolve!(*a).first).tap do |v|
48
48
  v.environment = self
49
49
  end
50
50
  end
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  module Sprockets
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  module Jekyll
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  module Jekyll
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  module Jekyll
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  module Jekyll
@@ -1,8 +1,8 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
- Jekyll::Assets::Utils.try_require "bootstrap"
6
- Jekyll::Assets::Utils.try_require "boostrap-sass" do
5
+ Jekyll::Assets::Utils.activate "bootstrap"
6
+ Jekyll::Assets::Utils.activate "boostrap-sass" do
7
7
  Bootstrap.load!
8
8
  end
@@ -0,0 +1,32 @@
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
@@ -1,8 +1,8 @@
1
1
  # rubocop:disable Naming/FileName
2
2
  # Frozen-string-literal: true
3
- # Copyright: 2012 - 2017 - MIT License
3
+ # Copyright: 2012 - 2018 - MIT License
4
4
  # Encoding: utf-8
5
5
 
6
- Jekyll::Assets::Utils.try_require "font-awesome-sass" do
6
+ Jekyll::Assets::Utils.activate "font-awesome-sass" do
7
7
  FontAwesome::Sass.load!
8
8
  end
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -8,7 +8,7 @@ module Jekyll
8
8
  module Assets
9
9
  class Default
10
10
  class Img < Default
11
- content_types %r!^image/(?\!x-icon$)[a-zA-Z0-9\-_]+$!
11
+ content_types %r!^image/(?\!x-icon$)[a-zA-Z0-9\-_+]+$!
12
12
 
13
13
  # --
14
14
  def set_src
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -9,7 +9,7 @@ module Jekyll
9
9
  module Assets
10
10
  class HTML
11
11
  class IMG < HTML
12
- content_types %r!^image/(?\!x-icon$)[a-zA-Z0-9\-_]+$!
12
+ content_types %r!^image/(?\!x-icon$)[a-zA-Z0-9\-_+]+$!
13
13
 
14
14
  # --
15
15
  def run
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "pathutil"
@@ -1,7 +1,7 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
- Jekyll::Assets::Utils.try_require "mini_magick" do
5
+ Jekyll::Assets::Utils.activate("mini_magick") do
6
6
  require_relative "proxy/magick"
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
- Jekyll::Assets::Utils.try_require "image_optim" do
5
+ Jekyll::Assets::Utils.activate "image_optim" do
6
6
  require_relative "proxy/optim"
7
7
  end
@@ -1,11 +1,11 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
6
6
 
7
7
  Jekyll::Assets::Utils.javascript? do
8
- Jekyll::Assets::Utils.try_require "autoprefixer-rails" do
8
+ Jekyll::Assets::Utils.activate "autoprefixer-rails" do
9
9
  Jekyll::Assets::Hook.register :config, :before_merge do |c|
10
10
  c.deep_merge!({
11
11
  plugins: {
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "jekyll/assets"
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "pathutil"
@@ -66,8 +66,22 @@ module Jekyll
66
66
  end
67
67
  end
68
68
 
69
+ # --
70
+ Jekyll::Assets::Hook.register :config, :before_merge do |c|
71
+ c.deep_merge!({
72
+ plugins: {
73
+ img: {
74
+ searcher: false,
75
+ },
76
+ },
77
+ })
78
+ end
79
+
80
+ # --
69
81
  Jekyll::Hooks.register [:pages, :documents, :posts], :post_render do |d|
70
- if d.output_ext == ".html"
71
- Jekyll::Assets::Plugins::Searcher.new(d).run
82
+ if d.site.sprockets.asset_config["plugins"]["img"]["searcher"]
83
+ if d.output_ext == ".html"
84
+ Jekyll::Assets::Plugins::Searcher.new(d).run
85
+ end
72
86
  end
73
87
  end
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "pathutil"
@@ -0,0 +1,33 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012 - 2018 - MIT License
3
+ # Encoding: utf-8
4
+
5
+ module SprocketsFileReaderPatches
6
+ def call(input)
7
+ before_hook(input); out = super; after_hook(out); out
8
+ end
9
+
10
+ # --
11
+ private
12
+ def before_hook(input)
13
+ Jekyll::Assets::Hook.trigger :asset, :before_read do |v|
14
+ v.call(input)
15
+ end
16
+ end
17
+
18
+ # --
19
+ private
20
+ def after_hook(input)
21
+ Jekyll::Assets::Hook.trigger :asset, :after_read do |v|
22
+ v.call(input)
23
+ end
24
+ end
25
+ end
26
+
27
+ module Sprockets
28
+ class FileReader
29
+ class << self
30
+ prepend SprocketsFileReaderPatches
31
+ end
32
+ end
33
+ end
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2012 - 2017 - MIT License
2
+ # Copyright: 2012 - 2018 - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "fastimage"
@@ -53,7 +53,7 @@ module Jekyll
53
53
 
54
54
  args = Liquid::Tag::Parser.new(@args)
55
55
  args = env.parse_liquid(args, ctx: ctx)
56
- raise Sprockets::FileNotFound, "UNKNOWN" unless args.key?(:argv1)
56
+ raise_unfound_asset_on(ctx: ctx, with: args) unless args.key?(:argv1)
57
57
  asset = external(ctx, args: args) if env.external?(args)
58
58
  asset ||= internal(ctx, args: args)
59
59
  [args, asset]
@@ -61,17 +61,15 @@ module Jekyll
61
61
 
62
62
  # --
63
63
  # @return [String]
64
- # rubocop:disable Metrics/AbcSize
65
64
  # Render the tag, run the proxies, set the defaults.
66
65
  # @note Defaults are ran twice just incase the content type
67
66
  # changes, at that point there might be something that
68
67
  # has to change in the new content.
69
68
  # --
70
69
  def render(ctx)
71
- env = ctx.registers[:site].sprockets
70
+ env = ctx.registers[:site].sprockets; args, asset = render_raw(ctx)
71
+ env.logger.debug args.to_h(html: false).inspect
72
72
 
73
- args, asset = render_raw(ctx)
74
- env.logger.debug args&.to_h(html: false).inspect
75
73
  return_or_build(ctx, args: args, asset: asset) do
76
74
  HTML.build({
77
75
  args: args,
@@ -80,11 +78,17 @@ module Jekyll
80
78
  })
81
79
  end
82
80
  # --
81
+ rescue Sprockets::FileNotFound => e
82
+ e_not_found(e, {
83
+ args: args,
84
+ ctx: ctx,
85
+ })
86
+ # --
83
87
  rescue ExecJS::RuntimeError => e
84
- env.logger.error e.message
85
- env.logger.efile args[:argv1]
86
- raise ExecJS::RuntimeError, \
87
- "JS Error"
88
+ e_exjs(e, {
89
+ args: args,
90
+ ctx: ctx,
91
+ })
88
92
  # --
89
93
  # @note you can --trace to get this same info
90
94
  # Handle errors that Sass ships because Jekyll finds
@@ -93,9 +97,10 @@ module Jekyll
93
97
  # never get it. That's not very good.
94
98
  # --
95
99
  rescue Sass::SyntaxError => e
96
- env.logger.error e.message
97
- env.logger.efile env.strip_paths(e.backtrace.first)
98
- raise Sass::SyntaxError, "Sass Error"
100
+ e_sass(e, {
101
+ args: args,
102
+ ctx: ctx,
103
+ })
99
104
  end
100
105
 
101
106
  # --
@@ -168,6 +173,42 @@ module Jekyll
168
173
 
169
174
  out
170
175
  end
176
+
177
+ # --
178
+ private
179
+ def raise_unfound_asset_on(ctx:, with:)
180
+ raise Sprockets::FileNotFound, "Unknown asset `#{with[:argv1]}'" \
181
+ " in #{ctx.registers[:page]['relative_path']}"
182
+ end
183
+
184
+ # --
185
+ def e_not_found(e, ctx:)
186
+ lines = e.message.each_line.to_a
187
+ page = ctx.registers[:page]&.[]("relative_path")
188
+ lines[0] = lines[0].strip + " in `#{page || 'Untraceable'}'\n"
189
+ raise e.class, lines.join
190
+ end
191
+
192
+ # --
193
+ private
194
+ def e_exjs(e, ctx:, args:)
195
+ env = ctx.registers[:site].sprockets
196
+
197
+ env.logger.error e.message
198
+ env.logger.efile args[:argv1]
199
+ raise e.class, "JS Error"
200
+ end
201
+
202
+ # --
203
+ private
204
+ def e_sass(e, ctx:, args:)
205
+ env = ctx.registers[:site].sprockets
206
+
207
+ env.logger.error e.message
208
+ env.logger.efile env.strip_paths(e.backtrace.first)
209
+ env.logger.error "error from file #{args[:argv1]}"
210
+ raise e.class, "Sass Error"
211
+ end
171
212
  end
172
213
  end
173
214
  end