sassc-embedded 1.77.6 → 1.77.8
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.
- checksums.yaml +4 -4
- data/README.md +32 -11
- data/lib/sassc/embedded/version.rb +1 -1
- data/lib/sassc/embedded.rb +15 -17
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed83a573f2e0ee97ab41239e66a4d9c3dadda78bc65ea225bee52328262da7eb
|
4
|
+
data.tar.gz: a703e807594f9917770f1bdd4bc1465f0331821654d3acd2eac852ba75d3ec9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4069b55f1d3a8c1566f1e5c2d7e483bec93e0c197309b506a6f8ed9861de8a0b80fa23c1bb4349545c89b6d4042c13667124a7e3f61ffe4433f296667ce78db9
|
7
|
+
data.tar.gz: bd2d69e4dce53262c4933203cd119cb5fcdef0743ca5127ef6228e4fd933575cd7afe9c6a4bf4ba9a522501cf60a312a51ba1c74e4195b76b07543218bbadee0
|
data/README.md
CHANGED
@@ -54,17 +54,38 @@ require 'sassc-embedded'
|
|
54
54
|
SassC::Engine.new(sass, style: :compressed).render
|
55
55
|
```
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
57
|
+
Most of the original `sassc` options are supported with no behavior difference unless noted otherwise:
|
58
|
+
|
59
|
+
- `:filename`
|
60
|
+
- `:quiet`
|
61
|
+
- ~~`:precision`~~ - ignored
|
62
|
+
- ~~`:line_comments`~~ - ignored
|
63
|
+
- `:syntax`
|
64
|
+
- `:source_map_embed`
|
65
|
+
- `:source_map_contents`
|
66
|
+
- `:omit_source_map_url`
|
67
|
+
- `:source_map_file`
|
68
|
+
- `:importer`
|
69
|
+
- `:functions`
|
70
|
+
- `:style` - ~~`:nested`~~ and ~~`:compact`~~ behave as `:expanded`
|
71
|
+
- `:load_paths`
|
72
|
+
|
73
|
+
See [`sassc-ruby` source code](https://github.com/sass/sassc-ruby/blob/master/lib/sassc/engine.rb) and [`libsass` documentation](https://github.com/sass/libsass/blob/master/docs/api-context.md) for details.
|
74
|
+
|
75
|
+
Additional `sass-embedded` options are supported:
|
76
|
+
|
77
|
+
- `:charset`
|
78
|
+
- `:importers`
|
79
|
+
- `:alert_ascii`
|
80
|
+
- `:alert_color`
|
81
|
+
- `:fatal_deprecations`
|
82
|
+
- `:future_deprecations`
|
83
|
+
- `:logger`
|
84
|
+
- `:quiet_deps`
|
85
|
+
- `:silence_deprecations`
|
86
|
+
- `:verbose`
|
87
|
+
|
88
|
+
See [`sass-embedded` documentation](https://rubydoc.info/gems/sass-embedded/Sass#compile_string-class_method) for details.
|
68
89
|
|
69
90
|
## Troubleshooting
|
70
91
|
|
data/lib/sassc/embedded.rb
CHANGED
@@ -34,7 +34,7 @@ module SassC
|
|
34
34
|
alert_color: @options.fetch(:alert_color, nil),
|
35
35
|
fatal_deprecations: @options.fetch(:fatal_deprecations, []),
|
36
36
|
future_deprecations: @options.fetch(:future_deprecations, []),
|
37
|
-
logger: @options.fetch(:logger, nil),
|
37
|
+
logger: quiet? ? ::Sass::Logger.silent : @options.fetch(:logger, nil),
|
38
38
|
quiet_deps: @options.fetch(:quiet_deps, false),
|
39
39
|
silence_deprecations: @options.fetch(:silence_deprecations, []),
|
40
40
|
verbose: @options.fetch(:verbose, false)
|
@@ -43,8 +43,6 @@ module SassC
|
|
43
43
|
@loaded_urls = result.loaded_urls
|
44
44
|
@source_map = result.source_map
|
45
45
|
|
46
|
-
return if quiet?
|
47
|
-
|
48
46
|
css = result.css
|
49
47
|
css += "\n" unless css.empty?
|
50
48
|
unless @source_map.nil? || omit_source_map_url?
|
@@ -231,7 +229,7 @@ module SassC
|
|
231
229
|
|
232
230
|
private_constant :FileImporter
|
233
231
|
|
234
|
-
|
232
|
+
module FileSystemImporter
|
235
233
|
class << self
|
236
234
|
def resolve_path(path, from_import)
|
237
235
|
ext = File.extname(path)
|
@@ -308,6 +306,7 @@ module SassC
|
|
308
306
|
def initialize(importer)
|
309
307
|
@importer = importer
|
310
308
|
@importer_results = {}
|
309
|
+
@importer_result = nil
|
311
310
|
@file_url = nil
|
312
311
|
end
|
313
312
|
|
@@ -322,28 +321,27 @@ module SassC
|
|
322
321
|
|
323
322
|
if containing_url.include?('?')
|
324
323
|
canonical_url = Uri.path_to_file_url(File.absolute_path(path, parent_dir))
|
325
|
-
|
326
|
-
canonical_url
|
327
|
-
else
|
324
|
+
unless @importer_results.key?(canonical_url)
|
328
325
|
@file_url = resolve_file_url(path, parent_dir, context.from_import)
|
329
|
-
|
326
|
+
return
|
330
327
|
end
|
331
328
|
else
|
332
|
-
imports =
|
333
|
-
imports = [SassC::Importer::Import.new(path)] if imports.nil?
|
334
|
-
imports = [imports] unless imports.is_a?(Array)
|
329
|
+
imports = [*@importer.imports(path, parent_path)]
|
335
330
|
canonical_url = imports_to_native(imports, parent_dir, context.from_import, url, containing_url)
|
336
|
-
|
337
|
-
canonical_url
|
338
|
-
else
|
331
|
+
unless @importer_results.key?(canonical_url)
|
339
332
|
@file_url = canonical_url
|
340
|
-
|
333
|
+
return
|
341
334
|
end
|
342
335
|
end
|
336
|
+
|
337
|
+
@importer_result = @importer_results.delete(canonical_url)
|
338
|
+
canonical_url
|
343
339
|
end
|
344
340
|
|
345
|
-
def load(
|
346
|
-
@
|
341
|
+
def load(_canonical_url)
|
342
|
+
importer_result = @importer_result
|
343
|
+
@importer_result = nil
|
344
|
+
importer_result
|
347
345
|
end
|
348
346
|
|
349
347
|
def find_file_url(_url, context)
|
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.77.
|
4
|
+
version: 1.77.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass-embedded
|
@@ -79,7 +79,7 @@ licenses:
|
|
79
79
|
metadata:
|
80
80
|
bug_tracker_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/issues
|
81
81
|
documentation_uri: https://rubydoc.info/gems/sassc
|
82
|
-
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.77.
|
82
|
+
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.77.8
|
83
83
|
funding_uri: https://github.com/sponsors/ntkme
|
84
84
|
rubygems_mfa_required: 'true'
|
85
85
|
post_install_message:
|