sprockets 4.0.0.beta4 → 4.0.0.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +5 -6
- data/lib/sprockets.rb +2 -8
- data/lib/sprockets/babel_processor.rb +4 -4
- data/lib/sprockets/base.rb +2 -0
- data/lib/sprockets/bundle.rb +38 -3
- data/lib/sprockets/cache.rb +34 -0
- data/lib/sprockets/cache/file_store.rb +17 -1
- data/lib/sprockets/cache/memory_store.rb +8 -0
- data/lib/sprockets/cache/null_store.rb +7 -0
- data/lib/sprockets/cached_environment.rb +10 -16
- data/lib/sprockets/coffee_script_processor.rb +9 -2
- data/lib/sprockets/digest_utils.rb +3 -0
- data/lib/sprockets/directive_processor.rb +21 -13
- data/lib/sprockets/loader.rb +1 -7
- data/lib/sprockets/manifest.rb +13 -9
- data/lib/sprockets/manifest_utils.rb +0 -1
- data/lib/sprockets/npm.rb +52 -0
- data/lib/sprockets/path_utils.rb +25 -1
- data/lib/sprockets/preprocessors/default_source_map.rb +27 -7
- data/lib/sprockets/sass_compressor.rb +3 -5
- data/lib/sprockets/sass_processor.rb +2 -18
- data/lib/sprockets/sassc_compressor.rb +11 -10
- data/lib/sprockets/sassc_processor.rb +10 -17
- data/lib/sprockets/server.rb +1 -1
- data/lib/sprockets/source_map_comment_processor.rb +6 -1
- data/lib/sprockets/source_map_processor.rb +16 -18
- data/lib/sprockets/source_map_utils.rb +197 -70
- data/lib/sprockets/uglifier_compressor.rb +14 -8
- data/lib/sprockets/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fec40bbdd1b072ed9297eb8a8c4cace3ad4d406
|
4
|
+
data.tar.gz: 7e75410bb1fb7fce7577c5c7a270795735940d0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41dc1ca9ad0acf4423861cc32353eb7e69f438fd01519ee2f0c5f6b543a4701b838132ebd1a55b3c2aedca5b2c2409b7221bc3199a7b094e9724c6165b9c7bbb
|
7
|
+
data.tar.gz: 2f9d9d7ca8cf7264eb99eb53b02f39d768f3f9472005d20a72655740c99eaf571977ddacd3ae07f8ada481e1390328e11cb2203bc415e29ecf496e93888d587a
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ Get upgrade notes from Sprockets 3.x to 4.x at https://github.com/rails/sprocket
|
|
4
4
|
|
5
5
|
## Master
|
6
6
|
|
7
|
+
## 4.0.0.beta5
|
8
|
+
|
9
|
+
- Reduce string allocations
|
10
|
+
- Source map metadata uses compressed form specified by the [source map v3 spec](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k). [#402] **[BREAKING]**
|
11
|
+
- Generate [index maps](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt) when decoding source maps isn't necessary. [#402]
|
12
|
+
- Remove fingerprints from source map files. [#402]
|
7
13
|
|
8
14
|
## 4.0.0.beta4
|
9
15
|
|
data/README.md
CHANGED
@@ -63,8 +63,8 @@ For example, if you have an `application.js` and want all the files in the `foo/
|
|
63
63
|
Then create a file `foo/index.js` that requires all the files in that folder in any order you want:
|
64
64
|
|
65
65
|
```
|
66
|
-
//= require foo.min.js
|
67
|
-
//= require foo-ui.js
|
66
|
+
//= require ./foo.min.js
|
67
|
+
//= require ./foo-ui.js
|
68
68
|
```
|
69
69
|
|
70
70
|
Now, your `application.js` will correctly load the `foo.min.js` before `foo-ui.js`. If you used `require_tree` it would not work correctly.
|
@@ -359,8 +359,8 @@ reference files relative to the location of the current file.
|
|
359
359
|
#### The `require` Directive
|
360
360
|
|
361
361
|
`require` *path* inserts the contents of the asset source file
|
362
|
-
specified by *path*. If the file is required multiple times
|
363
|
-
appear in the bundle only once.
|
362
|
+
specified by *path*. If the same file is required multiple times
|
363
|
+
with different path expressions, it will appear in the bundle only once.
|
364
364
|
|
365
365
|
#### The `require_directory` Directive
|
366
366
|
|
@@ -440,7 +440,7 @@ Similar to Rack, a processor is any "callable" (an object that responds to `call
|
|
440
440
|
|
441
441
|
Also see [`Sprockets::ProcessorUtils`](https://github.com/rails/sprockets/blob/master/lib/sprockets/processor_utils.rb) for public helper methods.
|
442
442
|
|
443
|
-
###
|
443
|
+
### Input Hash
|
444
444
|
|
445
445
|
The `input` Hash defines the following public fields.
|
446
446
|
|
@@ -448,7 +448,6 @@ The `input` Hash defines the following public fields.
|
|
448
448
|
* `:environment` - Current `Sprockets::Environment` instance.
|
449
449
|
* `:cache` - A `Sprockets::Cache` instance. See [`Sprockets::Cache#fetch`](https://github.com/rails/sprockets/blob/master/lib/sprockets/cache.rb).
|
450
450
|
* `:uri` - String Asset URI.
|
451
|
-
* `:source_path` - String full path to original file.
|
452
451
|
* `:load_path` - String current load path for filename.
|
453
452
|
* `:name` - String logical path for filename.
|
454
453
|
* `:content_type` - String content type of the output asset.
|
data/lib/sprockets.rb
CHANGED
@@ -99,13 +99,7 @@ module Sprockets
|
|
99
99
|
end
|
100
100
|
|
101
101
|
register_pipeline :default do |env, type, file_type|
|
102
|
-
|
103
|
-
if (type == "application/js-sourcemap+json" && file_type != "application/js-sourcemap+json") ||
|
104
|
-
(type == "application/css-sourcemap+json" && file_type != "application/css-sourcemap+json")
|
105
|
-
[SourceMapProcessor]
|
106
|
-
else
|
107
|
-
env.default_processors_for(type, file_type)
|
108
|
-
end
|
102
|
+
env.default_processors_for(type, file_type)
|
109
103
|
end
|
110
104
|
|
111
105
|
require 'sprockets/source_map_comment_processor'
|
@@ -129,7 +123,7 @@ module Sprockets
|
|
129
123
|
register_bundle_metadata_reducer 'application/javascript', :data, proc { String.new("") }, Utils.method(:concat_javascript_sources)
|
130
124
|
register_bundle_metadata_reducer '*/*', :links, :+
|
131
125
|
register_bundle_metadata_reducer '*/*', :sources, proc { [] }, :+
|
132
|
-
register_bundle_metadata_reducer '*/*', :map, SourceMapUtils.method(:concat_source_maps)
|
126
|
+
register_bundle_metadata_reducer '*/*', :map, proc { |input| { "version" => 3, "file" => PathUtils.split_subpath(input[:load_path], input[:filename]), "sections" => [] } }, SourceMapUtils.method(:concat_source_maps)
|
133
127
|
|
134
128
|
require 'sprockets/closure_compressor'
|
135
129
|
require 'sprockets/sass_compressor'
|
@@ -42,11 +42,11 @@ module Sprockets
|
|
42
42
|
|
43
43
|
result = input[:cache].fetch(@cache_key + [input[:filename]] + [data]) do
|
44
44
|
opts = {
|
45
|
-
'sourceRoot' => input[:load_path],
|
46
45
|
'moduleRoot' => nil,
|
47
46
|
'filename' => input[:filename],
|
48
47
|
'filenameRelative' => PathUtils.split_subpath(input[:load_path], input[:filename]),
|
49
|
-
'sourceFileName' => input[:
|
48
|
+
'sourceFileName' => File.basename(input[:filename]),
|
49
|
+
'sourceMapTarget' => input[:filename]
|
50
50
|
}.merge(@options)
|
51
51
|
|
52
52
|
if opts['moduleIds'] && opts['moduleRoot']
|
@@ -57,8 +57,8 @@ module Sprockets
|
|
57
57
|
Autoload::Babel::Transpiler.transform(data, opts)
|
58
58
|
end
|
59
59
|
|
60
|
-
map = SourceMapUtils.
|
61
|
-
map = SourceMapUtils.combine_source_maps(input[:metadata][:map], map
|
60
|
+
map = SourceMapUtils.format_source_map(result["map"], input)
|
61
|
+
map = SourceMapUtils.combine_source_maps(input[:metadata][:map], map)
|
62
62
|
|
63
63
|
{ data: result['code'], map: map }
|
64
64
|
end
|
data/lib/sprockets/base.rb
CHANGED
@@ -6,6 +6,7 @@ require 'sprockets/configuration'
|
|
6
6
|
require 'sprockets/digest_utils'
|
7
7
|
require 'sprockets/errors'
|
8
8
|
require 'sprockets/loader'
|
9
|
+
require 'sprockets/npm'
|
9
10
|
require 'sprockets/path_dependency_utils'
|
10
11
|
require 'sprockets/path_digest_utils'
|
11
12
|
require 'sprockets/path_utils'
|
@@ -22,6 +23,7 @@ module Sprockets
|
|
22
23
|
include Server
|
23
24
|
include Resolve, Loader
|
24
25
|
include Bower
|
26
|
+
include Npm
|
25
27
|
|
26
28
|
# Get persistent cache store
|
27
29
|
attr_reader :cache
|
data/lib/sprockets/bundle.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'set'
|
3
3
|
require 'sprockets/utils'
|
4
|
+
require 'sprockets/uri_utils'
|
4
5
|
|
5
6
|
module Sprockets
|
6
7
|
# Internal: Bundle processor takes a single file asset and prepends all the
|
@@ -16,15 +17,32 @@ module Sprockets
|
|
16
17
|
def self.call(input)
|
17
18
|
env = input[:environment]
|
18
19
|
type = input[:content_type]
|
20
|
+
input[:links] ||= Set.new
|
19
21
|
dependencies = Set.new(input[:metadata][:dependencies])
|
20
22
|
|
21
23
|
processed_uri, deps = env.resolve(input[:filename], accept: type, pipeline: :self)
|
22
24
|
dependencies.merge(deps)
|
23
25
|
|
26
|
+
# DirectiveProcessor (and any other transformers called here with pipeline=self)
|
27
|
+
primary_asset = env.load(processed_uri)
|
28
|
+
to_load = primary_asset.metadata.delete(:to_load) || Set.new
|
29
|
+
to_link = primary_asset.metadata.delete(:to_link) || Set.new
|
30
|
+
|
31
|
+
to_load.each do |uri|
|
32
|
+
loaded_asset = env.load(uri)
|
33
|
+
dependencies.merge(loaded_asset.metadata[:dependencies])
|
34
|
+
if to_link.include?(uri)
|
35
|
+
primary_metadata = primary_asset.metadata
|
36
|
+
input[:links] << loaded_asset.uri
|
37
|
+
primary_metadata[:links] << loaded_asset.uri
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
24
41
|
find_required = proc { |uri| env.load(uri).metadata[:required] }
|
25
42
|
required = Utils.dfs(processed_uri, &find_required)
|
26
43
|
stubbed = Utils.dfs(env.load(processed_uri).metadata[:stubbed], &find_required)
|
27
44
|
required.subtract(stubbed)
|
45
|
+
dedup(required)
|
28
46
|
assets = required.map { |uri| env.load(uri) }
|
29
47
|
|
30
48
|
(required + stubbed).each do |uri|
|
@@ -32,21 +50,38 @@ module Sprockets
|
|
32
50
|
end
|
33
51
|
|
34
52
|
reducers = Hash[env.match_mime_type_keys(env.config[:bundle_reducers], type).flat_map(&:to_a)]
|
35
|
-
process_bundle_reducers(assets, reducers).merge(dependencies: dependencies, included: assets.map(&:uri))
|
53
|
+
process_bundle_reducers(input, assets, reducers).merge(dependencies: dependencies, included: assets.map(&:uri))
|
54
|
+
end
|
55
|
+
|
56
|
+
# Internal: Removes uri from required if it's already included as an alias.
|
57
|
+
#
|
58
|
+
# required - Set of required uris
|
59
|
+
#
|
60
|
+
# Returns deduped set of uris
|
61
|
+
def self.dedup(required)
|
62
|
+
dupes = required.reduce([]) do |r, uri|
|
63
|
+
path, params = URIUtils.parse_asset_uri(uri)
|
64
|
+
if (params.delete(:index_alias))
|
65
|
+
r << URIUtils.build_asset_uri(path, params)
|
66
|
+
end
|
67
|
+
r
|
68
|
+
end
|
69
|
+
required.subtract(dupes)
|
36
70
|
end
|
37
71
|
|
38
72
|
# Internal: Run bundle reducers on set of Assets producing a reduced
|
39
73
|
# metadata Hash.
|
40
74
|
#
|
75
|
+
# filename - String bundle filename
|
41
76
|
# assets - Array of Assets
|
42
77
|
# reducers - Array of [initial, reducer_proc] pairs
|
43
78
|
#
|
44
79
|
# Returns reduced asset metadata Hash.
|
45
|
-
def self.process_bundle_reducers(assets, reducers)
|
80
|
+
def self.process_bundle_reducers(input, assets, reducers)
|
46
81
|
initial = {}
|
47
82
|
reducers.each do |k, (v, _)|
|
48
83
|
if v.respond_to?(:call)
|
49
|
-
initial[k] = v.call
|
84
|
+
initial[k] = v.call(input)
|
50
85
|
elsif !v.nil?
|
51
86
|
initial[k] = v
|
52
87
|
end
|
data/lib/sprockets/cache.rb
CHANGED
@@ -36,6 +36,12 @@ module Sprockets
|
|
36
36
|
#
|
37
37
|
# Returns argument value.
|
38
38
|
#
|
39
|
+
# clear(options)
|
40
|
+
#
|
41
|
+
# Clear the entire cache. Be careful with this method since it could
|
42
|
+
# affect other processes if shared cache is being used.
|
43
|
+
#
|
44
|
+
# The options hash is passed to the underlying cache implementation.
|
39
45
|
class Cache
|
40
46
|
# Builtin cache stores.
|
41
47
|
autoload :FileStore, 'sprockets/cache/file_store'
|
@@ -144,6 +150,14 @@ module Sprockets
|
|
144
150
|
"#<#{self.class} local=#{@fetch_cache.inspect} store=#{@cache_wrapper.cache.inspect}>"
|
145
151
|
end
|
146
152
|
|
153
|
+
# Public: Clear cache
|
154
|
+
#
|
155
|
+
# Returns truthy on success, potentially raises exception on failure
|
156
|
+
def clear(options=nil)
|
157
|
+
@cache_wrapper.clear
|
158
|
+
@fetch_cache.clear
|
159
|
+
end
|
160
|
+
|
147
161
|
private
|
148
162
|
# Internal: Expand object cache key into a short String key.
|
149
163
|
#
|
@@ -212,6 +226,16 @@ module Sprockets
|
|
212
226
|
def set(key, value)
|
213
227
|
cache.set(key, value)
|
214
228
|
end
|
229
|
+
|
230
|
+
def clear(options=nil)
|
231
|
+
# dalli has a #flush method so try it
|
232
|
+
if cache.respond_to?(:flush)
|
233
|
+
cache.flush(options)
|
234
|
+
else
|
235
|
+
cache.clear(options)
|
236
|
+
end
|
237
|
+
true
|
238
|
+
end
|
215
239
|
end
|
216
240
|
|
217
241
|
class HashWrapper < Wrapper
|
@@ -222,6 +246,11 @@ module Sprockets
|
|
222
246
|
def set(key, value)
|
223
247
|
cache[key] = value
|
224
248
|
end
|
249
|
+
|
250
|
+
def clear(options=nil)
|
251
|
+
cache.clear
|
252
|
+
true
|
253
|
+
end
|
225
254
|
end
|
226
255
|
|
227
256
|
class ReadWriteWrapper < Wrapper
|
@@ -232,6 +261,11 @@ module Sprockets
|
|
232
261
|
def set(key, value)
|
233
262
|
cache.write(key, value)
|
234
263
|
end
|
264
|
+
|
265
|
+
def clear(options=nil)
|
266
|
+
cache.clear(options)
|
267
|
+
true
|
268
|
+
end
|
235
269
|
end
|
236
270
|
end
|
237
271
|
end
|
@@ -20,7 +20,8 @@ module Sprockets
|
|
20
20
|
class FileStore
|
21
21
|
# Internal: Default key limit for store.
|
22
22
|
DEFAULT_MAX_SIZE = 25 * 1024 * 1024
|
23
|
-
|
23
|
+
EXCLUDED_DIRS = ['.', '..'].freeze
|
24
|
+
GITKEEP_FILES = ['.gitkeep', '.keep'].freeze
|
24
25
|
# Internal: Default standard error fatal logger.
|
25
26
|
#
|
26
27
|
# Returns a Logger.
|
@@ -123,6 +124,21 @@ module Sprockets
|
|
123
124
|
"#<#{self.class} size=#{size}/#{@max_size}>"
|
124
125
|
end
|
125
126
|
|
127
|
+
# Public: Clear the cache
|
128
|
+
#
|
129
|
+
# adapted from ActiveSupport::Cache::FileStore#clear
|
130
|
+
#
|
131
|
+
# Deletes all items from the cache. In this case it deletes all the entries in the specified
|
132
|
+
# file store directory except for .keep or .gitkeep. Be careful which directory is specified
|
133
|
+
# as @root because everything in that directory will be deleted.
|
134
|
+
#
|
135
|
+
# Returns true
|
136
|
+
def clear(options=nil)
|
137
|
+
root_dirs = Dir.entries(@root).reject { |f| (EXCLUDED_DIRS + GITKEEP_FILES).include?(f) }
|
138
|
+
FileUtils.rm_r(root_dirs.collect{ |f| File.join(@root, f) })
|
139
|
+
true
|
140
|
+
end
|
141
|
+
|
126
142
|
private
|
127
143
|
# Internal: Get all cache files along with stats.
|
128
144
|
#
|
@@ -16,12 +16,11 @@ module Sprockets
|
|
16
16
|
initialize_configuration(environment)
|
17
17
|
|
18
18
|
@cache = environment.cache
|
19
|
-
@stats =
|
20
|
-
@entries =
|
21
|
-
@uris =
|
22
|
-
|
23
|
-
@
|
24
|
-
@resolved_dependencies = Hash.new { |h, k| h[k] = _resolve_dependency(k) }
|
19
|
+
@stats = {}
|
20
|
+
@entries = {}
|
21
|
+
@uris = {}
|
22
|
+
@processor_cache_keys = {}
|
23
|
+
@resolved_dependencies = {}
|
25
24
|
end
|
26
25
|
|
27
26
|
# No-op return self as cached environment.
|
@@ -31,33 +30,28 @@ module Sprockets
|
|
31
30
|
alias_method :index, :cached
|
32
31
|
|
33
32
|
# Internal: Cache Environment#entries
|
34
|
-
alias_method :_entries, :entries
|
35
33
|
def entries(path)
|
36
|
-
@entries[path]
|
34
|
+
@entries[path] ||= super(path)
|
37
35
|
end
|
38
36
|
|
39
37
|
# Internal: Cache Environment#stat
|
40
|
-
alias_method :_stat, :stat
|
41
38
|
def stat(path)
|
42
|
-
@stats[path]
|
39
|
+
@stats[path] ||= super(path)
|
43
40
|
end
|
44
41
|
|
45
42
|
# Internal: Cache Environment#load
|
46
|
-
alias_method :_load, :load
|
47
43
|
def load(uri)
|
48
|
-
@uris[uri]
|
44
|
+
@uris[uri] ||= super(uri)
|
49
45
|
end
|
50
46
|
|
51
47
|
# Internal: Cache Environment#processor_cache_key
|
52
|
-
alias_method :_processor_cache_key, :processor_cache_key
|
53
48
|
def processor_cache_key(str)
|
54
|
-
@processor_cache_keys[str]
|
49
|
+
@processor_cache_keys[str] ||= super(str)
|
55
50
|
end
|
56
51
|
|
57
52
|
# Internal: Cache Environment#resolve_dependency
|
58
|
-
alias_method :_resolve_dependency, :resolve_dependency
|
59
53
|
def resolve_dependency(str)
|
60
|
-
@resolved_dependencies[str]
|
54
|
+
@resolved_dependencies[str] ||= super(str)
|
61
55
|
end
|
62
56
|
|
63
57
|
private
|
@@ -21,11 +21,18 @@ module Sprockets
|
|
21
21
|
data = input[:data]
|
22
22
|
|
23
23
|
js, map = input[:cache].fetch([self.cache_key, data]) do
|
24
|
-
result = Autoload::CoffeeScript.compile(
|
25
|
-
|
24
|
+
result = Autoload::CoffeeScript.compile(
|
25
|
+
data,
|
26
|
+
sourceMap: "v3",
|
27
|
+
sourceFiles: [File.basename(input[:filename])],
|
28
|
+
generatedFile: input[:filename]
|
29
|
+
)
|
30
|
+
[result['js'], JSON.parse(result['v3SourceMap'])]
|
26
31
|
end
|
27
32
|
|
33
|
+
map = SourceMapUtils.format_source_map(map, input)
|
28
34
|
map = SourceMapUtils.combine_source_maps(input[:metadata][:map], map)
|
35
|
+
|
29
36
|
{ data: js, map: map }
|
30
37
|
end
|
31
38
|
end
|
@@ -70,20 +70,28 @@ module Sprockets
|
|
70
70
|
@uri = input[:uri]
|
71
71
|
@filename = input[:filename]
|
72
72
|
@dirname = File.dirname(@filename)
|
73
|
-
|
73
|
+
# If loading a source map file like `application.js.map` resolve
|
74
|
+
# dependencies using `.js` instead of `.js.map`
|
75
|
+
@content_type = SourceMapProcessor.original_content_type(input[:content_type], error_when_not_found: false)
|
74
76
|
@required = Set.new(input[:metadata][:required])
|
75
77
|
@stubbed = Set.new(input[:metadata][:stubbed])
|
76
78
|
@links = Set.new(input[:metadata][:links])
|
77
79
|
@dependencies = Set.new(input[:metadata][:dependencies])
|
80
|
+
@to_link = Set.new
|
81
|
+
@to_load = Set.new
|
78
82
|
|
79
83
|
data, directives = process_source(input[:data])
|
80
84
|
process_directives(directives)
|
81
85
|
|
82
|
-
{
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
86
|
+
{
|
87
|
+
data: data,
|
88
|
+
required: @required,
|
89
|
+
stubbed: @stubbed,
|
90
|
+
links: @links,
|
91
|
+
to_load: @to_load,
|
92
|
+
to_link: @to_link,
|
93
|
+
dependencies: @dependencies
|
94
|
+
}
|
87
95
|
end
|
88
96
|
|
89
97
|
protected
|
@@ -274,7 +282,7 @@ module Sprockets
|
|
274
282
|
# //= depend_on_asset "bar.js"
|
275
283
|
#
|
276
284
|
def process_depend_on_asset_directive(path)
|
277
|
-
|
285
|
+
to_load(resolve(path))
|
278
286
|
end
|
279
287
|
|
280
288
|
# Allows dependency to be excluded from the asset bundle.
|
@@ -298,7 +306,8 @@ module Sprockets
|
|
298
306
|
# /*= link "logo.png" */
|
299
307
|
#
|
300
308
|
def process_link_directive(path)
|
301
|
-
|
309
|
+
uri = to_load(resolve(path))
|
310
|
+
@to_link << uri
|
302
311
|
end
|
303
312
|
|
304
313
|
# `link_directory` links all the files inside a single
|
@@ -355,7 +364,7 @@ module Sprockets
|
|
355
364
|
|
356
365
|
def link_paths(paths, deps, accept)
|
357
366
|
resolve_paths(paths, deps, accept: accept) do |uri|
|
358
|
-
@
|
367
|
+
@to_link << to_load(uri)
|
359
368
|
end
|
360
369
|
end
|
361
370
|
|
@@ -385,10 +394,9 @@ module Sprockets
|
|
385
394
|
end
|
386
395
|
end
|
387
396
|
|
388
|
-
def
|
389
|
-
|
390
|
-
|
391
|
-
asset
|
397
|
+
def to_load(uri)
|
398
|
+
@to_load << uri
|
399
|
+
uri
|
392
400
|
end
|
393
401
|
|
394
402
|
def resolve(path, **kargs)
|