sassc-embedded 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sassc/embedded/version.rb +1 -1
- data/lib/sassc/embedded.rb +12 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 695381cf5ae96903ffaf015c6e406eab12c38312008ee5dce88e2f1658d6da35
|
4
|
+
data.tar.gz: c5c981214af6123d9c17ff3dc4b6099bc78864419df9c29848ce146ebbfeca2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a346cd91ea29ae9618460eee15592b1316948637bae1054a343521f9a0194b290c972d37481fd91b068d47bf83d38a033efb2f9e20f3713fcbc7ad339110cbb
|
7
|
+
data.tar.gz: 36d53934e2f475d3c62a42a5f7530c32668d42d4ba3a09a84eed6177bb9256d4dc7383adf64d80b6863590bffbfc676c6cec6b792b24523cbce7b516d887ff5d
|
data/lib/sassc/embedded.rb
CHANGED
@@ -295,6 +295,8 @@ module SassC
|
|
295
295
|
def initialize(importer)
|
296
296
|
@importer = importer
|
297
297
|
@importer_results = {}
|
298
|
+
@load_id = 0
|
299
|
+
@load_urls = {}
|
298
300
|
@parent_urls = [URL.path_to_file_url(File.absolute_path(@importer.options[:filename] || 'stdin'))]
|
299
301
|
end
|
300
302
|
|
@@ -302,7 +304,7 @@ module SassC
|
|
302
304
|
return url if url.start_with?(Protocol::IMPORT, Protocol::LOADED)
|
303
305
|
|
304
306
|
if url.start_with?(Protocol::LOAD)
|
305
|
-
url = url.delete_prefix(Protocol::LOAD)
|
307
|
+
url = @load_urls.delete(url.delete_prefix(Protocol::LOAD))
|
306
308
|
return url if @importer_results.key?(url)
|
307
309
|
|
308
310
|
path = URL.parse(url).route_from(@parent_urls.last).to_s
|
@@ -382,25 +384,28 @@ module SassC
|
|
382
384
|
def imports_to_native(imports)
|
383
385
|
{
|
384
386
|
contents: imports.flat_map do |import|
|
385
|
-
|
387
|
+
load_id = @load_id
|
388
|
+
@load_id = load_id.next
|
389
|
+
load_url = URL.path_to_file_url(import.path)
|
390
|
+
@load_urls[load_id.to_s] = load_url
|
386
391
|
if import.source
|
387
|
-
@importer_results[
|
392
|
+
@importer_results[load_url] = if import.source.is_a?(Hash)
|
388
393
|
{
|
389
394
|
contents: import.source[:contents],
|
390
395
|
syntax: import.source[:syntax],
|
391
|
-
source_map_url:
|
396
|
+
source_map_url: load_url
|
392
397
|
}
|
393
398
|
else
|
394
399
|
{
|
395
400
|
contents: import.source,
|
396
401
|
syntax: syntax(import.path),
|
397
|
-
source_map_url:
|
402
|
+
source_map_url: load_url
|
398
403
|
}
|
399
404
|
end
|
400
405
|
end
|
401
406
|
[
|
402
|
-
"@import
|
403
|
-
"@import
|
407
|
+
"@import \"#{Protocol::LOAD}#{load_id}\";",
|
408
|
+
"@import \"#{Protocol::LOADED}#{load_id}\";"
|
404
409
|
]
|
405
410
|
end.join("\n"),
|
406
411
|
syntax: :scss
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc-embedded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sassc
|
@@ -138,8 +138,8 @@ homepage: https://github.com/ntkme/sassc-embedded-polyfill-ruby
|
|
138
138
|
licenses:
|
139
139
|
- MIT
|
140
140
|
metadata:
|
141
|
-
documentation_uri: https://rubydoc.info/gems/sassc-embedded/1.5.
|
142
|
-
source_code_uri: https://github.com/ntkme/sassc-embedded-polyfill-ruby/tree/v1.5.
|
141
|
+
documentation_uri: https://rubydoc.info/gems/sassc-embedded/1.5.5
|
142
|
+
source_code_uri: https://github.com/ntkme/sassc-embedded-polyfill-ruby/tree/v1.5.5
|
143
143
|
funding_uri: https://github.com/sponsors/ntkme
|
144
144
|
post_install_message:
|
145
145
|
rdoc_options: []
|