sass-embedded 0.12.0 → 0.13.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66553cec396e3756a62ded16038be4d37c891e4a12f29bd6eac3c29ca90f7a83
|
4
|
+
data.tar.gz: c417c5299585437b5b27a57577aeae2995cb259b3ff4f70225c554305a7233ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c48f41fd91c77065313d27677a90795c765ecf3ebbc2c50315e796a1ce7c57431e120691ad5205129a69f1dd6c5ff28aa5828a39bf24015acbfebf8306584a39
|
7
|
+
data.tar.gz: 183d281f59d7d91aaa9817a97574c13233e0c14f03fee68bc96f26383cf247dc38472a372c814ee4466fff8c6010e7c503bb612f5b0ebef9b846ff31ef4231cf
|
@@ -20,6 +20,7 @@ module Sass
|
|
20
20
|
url:,
|
21
21
|
|
22
22
|
source_map:,
|
23
|
+
source_map_include_sources:,
|
23
24
|
style:,
|
24
25
|
|
25
26
|
functions:,
|
@@ -39,6 +40,7 @@ module Sass
|
|
39
40
|
@url = url
|
40
41
|
|
41
42
|
@source_map = source_map
|
43
|
+
@source_map_include_sources = source_map_include_sources
|
42
44
|
@style = style
|
43
45
|
|
44
46
|
@global_functions = functions.keys.map(&:to_s)
|
@@ -151,6 +153,7 @@ module Sass
|
|
151
153
|
path: @path,
|
152
154
|
style: to_proto_output_style(@style),
|
153
155
|
source_map: @source_map,
|
156
|
+
source_map_include_sources: @source_map_include_sources,
|
154
157
|
importers: to_proto_importers(@importers, @load_paths),
|
155
158
|
global_functions: @global_functions,
|
156
159
|
alert_ascii: @alert_ascii,
|
@@ -293,7 +296,7 @@ module Sass
|
|
293
296
|
sym = sym.to_sym
|
294
297
|
if obj.respond_to? sym
|
295
298
|
obj.method(sym)
|
296
|
-
elsif obj.
|
299
|
+
elsif obj.is_a? Hash
|
297
300
|
if obj[sym].respond_to? :call
|
298
301
|
obj[sym]
|
299
302
|
elsif obj[sym.to_s].respond_to? :call
|
@@ -306,7 +309,7 @@ module Sass
|
|
306
309
|
sym = sym.to_sym
|
307
310
|
if obj.respond_to? sym
|
308
311
|
obj.method(sym).call
|
309
|
-
elsif obj.
|
312
|
+
elsif obj.is_a? Hash
|
310
313
|
if obj[sym]
|
311
314
|
obj[sym]
|
312
315
|
elsif obj[sym.to_s]
|
data/lib/sass/embedded/render.rb
CHANGED
@@ -66,6 +66,7 @@ module Sass
|
|
66
66
|
syntax: indented_syntax ? :indented : :scss,
|
67
67
|
url: (Url.path_to_file_url(File.absolute_path(file)) unless file.nil?),
|
68
68
|
source_map: source_map_option,
|
69
|
+
source_map_include_sources: source_map_contents,
|
69
70
|
style: output_style,
|
70
71
|
functions: functions,
|
71
72
|
importers: importer.map do |legacy_importer|
|
@@ -74,6 +75,7 @@ module Sass
|
|
74
75
|
else
|
75
76
|
compile(file, load_paths: load_paths,
|
76
77
|
source_map: source_map_option,
|
78
|
+
source_map_include_sources: source_map_contents,
|
77
79
|
style: output_style,
|
78
80
|
functions: functions,
|
79
81
|
importers: importer.map do |legacy_importer|
|
@@ -98,11 +100,9 @@ module Sass
|
|
98
100
|
end
|
99
101
|
|
100
102
|
map, source_map = post_process_map(map: compile_result.source_map,
|
101
|
-
data: data,
|
102
103
|
file: file,
|
103
104
|
out_file: out_file,
|
104
105
|
source_map: source_map,
|
105
|
-
source_map_contents: source_map_contents,
|
106
106
|
source_map_root: source_map_root)
|
107
107
|
|
108
108
|
css = post_process_css(css: compile_result.css,
|
@@ -172,11 +172,9 @@ module Sass
|
|
172
172
|
|
173
173
|
# @deprecated
|
174
174
|
def post_process_map(map:,
|
175
|
-
data:,
|
176
175
|
file:,
|
177
176
|
out_file:,
|
178
177
|
source_map:,
|
179
|
-
source_map_contents:,
|
180
178
|
source_map_root:)
|
181
179
|
return if map.nil? || map.empty?
|
182
180
|
|
@@ -201,26 +199,11 @@ module Sass
|
|
201
199
|
map_data['file'] = 'stdin.css'
|
202
200
|
end
|
203
201
|
|
204
|
-
map_data['sourcesContent'] = [] if source_map_contents
|
205
|
-
|
206
|
-
file = File.absolute_path(file) unless file.nil?
|
207
|
-
|
208
202
|
map_data['sources'].map! do |source|
|
209
203
|
if source.start_with? 'file://'
|
210
204
|
path = Url.file_url_to_path(source)
|
211
|
-
content = if path == file && !data.nil?
|
212
|
-
data
|
213
|
-
else
|
214
|
-
begin
|
215
|
-
File.read(path)
|
216
|
-
rescue StandardError
|
217
|
-
nil
|
218
|
-
end
|
219
|
-
end
|
220
|
-
map_data['sourcesContent'].push(content) if source_map_contents
|
221
205
|
relative_path(source_map_dir, path)
|
222
206
|
else
|
223
|
-
map_data['sourcesContent'].push(nil) if source_map_contents
|
224
207
|
source
|
225
208
|
end
|
226
209
|
end
|
data/lib/sass/embedded/url.rb
CHANGED
data/lib/sass/embedded.rb
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
require_relative 'compile_error'
|
4
4
|
require_relative 'compile_result'
|
5
|
-
require_relative 'importer_result'
|
6
5
|
require_relative 'embedded/channel'
|
7
6
|
require_relative 'embedded/compile_context'
|
8
7
|
require_relative 'embedded/render'
|
9
8
|
require_relative 'embedded/url'
|
10
9
|
require_relative 'embedded/version'
|
11
10
|
require_relative 'embedded/version_context'
|
11
|
+
require_relative 'importer_result'
|
12
12
|
require_relative 'logger'
|
13
13
|
|
14
14
|
module Sass
|
@@ -34,6 +34,7 @@ module Sass
|
|
34
34
|
load_paths: [],
|
35
35
|
|
36
36
|
source_map: false,
|
37
|
+
source_map_include_sources: false,
|
37
38
|
style: :expanded,
|
38
39
|
|
39
40
|
functions: {},
|
@@ -55,6 +56,7 @@ module Sass
|
|
55
56
|
syntax: nil,
|
56
57
|
url: nil,
|
57
58
|
source_map: source_map,
|
59
|
+
source_map_include_sources: source_map_include_sources,
|
58
60
|
style: style,
|
59
61
|
functions: functions,
|
60
62
|
importers: importers,
|
@@ -81,6 +83,7 @@ module Sass
|
|
81
83
|
url: nil,
|
82
84
|
|
83
85
|
source_map: false,
|
86
|
+
source_map_include_sources: false,
|
84
87
|
style: :expanded,
|
85
88
|
|
86
89
|
functions: {},
|
@@ -101,6 +104,7 @@ module Sass
|
|
101
104
|
syntax: syntax,
|
102
105
|
url: url,
|
103
106
|
source_map: source_map,
|
107
|
+
source_map_include_sources: source_map_include_sources,
|
104
108
|
style: style,
|
105
109
|
functions: functions,
|
106
110
|
importers: importers,
|
@@ -119,7 +123,7 @@ module Sass
|
|
119
123
|
#
|
120
124
|
# @raise [ProtocolError]
|
121
125
|
def info
|
122
|
-
@info ||= VersionContext.new(@channel).receive_message
|
126
|
+
@info ||= "sass-embedded\t#{VersionContext.new(@channel).receive_message.implementation_version}"
|
123
127
|
end
|
124
128
|
|
125
129
|
def close
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass-embedded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -192,8 +192,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
|
|
192
192
|
licenses:
|
193
193
|
- MIT
|
194
194
|
metadata:
|
195
|
-
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.
|
196
|
-
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.
|
195
|
+
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.13.3
|
196
|
+
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.13.3
|
197
197
|
funding_uri: https://github.com/sponsors/ntkme
|
198
198
|
post_install_message:
|
199
199
|
rdoc_options: []
|