sprockets-bumble_d 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sprockets/bumble_d/transformer.rb +18 -9
- data/lib/sprockets/bumble_d/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c28bf102b37d7cd1d004921a300e84e6e5c061f
|
4
|
+
data.tar.gz: af0245aee73d77674416b5ea4e70154e7e726a87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: def03f875401ec22cb73ef41579638cde4daf004cce6a62131d38b84273f50e3359750615aaf02c623e931d7b1ce7e8cdb205547f91069c993a296afd47f1b57
|
7
|
+
data.tar.gz: 18392c5d1e31ff6cc2fc769228fa2ba9d9fb7142731ad7a70da6d1468f6f76b8212855d2888c4237252c1f26563a3f35719f879e22dde9ee9e8a50b9a3effa6b
|
@@ -17,7 +17,7 @@ module Sprockets
|
|
17
17
|
|
18
18
|
attr_reader :cache_key
|
19
19
|
|
20
|
-
# rubocop:disable Metrics/
|
20
|
+
# rubocop:disable Metrics/MethodLength
|
21
21
|
def initialize(options)
|
22
22
|
@options = options.dup
|
23
23
|
@root_dir = @options.delete(:root_dir)
|
@@ -30,12 +30,7 @@ module Sprockets
|
|
30
30
|
raise RootDirectoryDoesNotExistError, error_message
|
31
31
|
end
|
32
32
|
|
33
|
-
|
34
|
-
plugins = @options[:plugins]
|
35
|
-
presets = @options[:presets]
|
36
|
-
@options[:plugins] = resolver.resolve_plugins(plugins) if plugins.is_a?(Array)
|
37
|
-
@options[:presets] = resolver.resolve_presets(presets) if presets.is_a?(Array)
|
38
|
-
|
33
|
+
@resolution_complete = false
|
39
34
|
@cache_key = [
|
40
35
|
self.class.name,
|
41
36
|
VERSION,
|
@@ -43,7 +38,7 @@ module Sprockets
|
|
43
38
|
@options
|
44
39
|
].freeze
|
45
40
|
end
|
46
|
-
# rubocop:enable Metrics/
|
41
|
+
# rubocop:enable Metrics/MethodLength
|
47
42
|
|
48
43
|
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
49
44
|
def call(input)
|
@@ -62,7 +57,7 @@ module Sprockets
|
|
62
57
|
filename: input[:filename],
|
63
58
|
filenameRelative: filename_relative,
|
64
59
|
ast: false
|
65
|
-
}.merge(
|
60
|
+
}.merge(options_with_resolved_plugins_and_presets)
|
66
61
|
|
67
62
|
if options[:moduleIds] && options[:moduleRoot]
|
68
63
|
options[:moduleId] ||= File.join(options[:moduleRoot], input[:name])
|
@@ -84,6 +79,20 @@ module Sprockets
|
|
84
79
|
def babel
|
85
80
|
@babel ||= BabelBridge.new(@root_dir)
|
86
81
|
end
|
82
|
+
|
83
|
+
private
|
84
|
+
|
85
|
+
def options_with_resolved_plugins_and_presets
|
86
|
+
unless @resolution_complete
|
87
|
+
resolver = Resolver.new(babel)
|
88
|
+
plugins = @options[:plugins]
|
89
|
+
presets = @options[:presets]
|
90
|
+
@options[:plugins] = resolver.resolve_plugins(plugins) if plugins.is_a?(Array)
|
91
|
+
@options[:presets] = resolver.resolve_presets(presets) if presets.is_a?(Array)
|
92
|
+
@resolution_complete = true
|
93
|
+
end
|
94
|
+
@options
|
95
|
+
end
|
87
96
|
end
|
88
97
|
end
|
89
98
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-bumble_d
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Macklin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|