sass-embedded 1.2.9 → 1.3.2
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/lib/sass/embedded/compiler.rb +1 -1
- data/lib/sass/embedded/host/no_op_importer.rb +17 -0
- data/lib/sass/embedded/host.rb +10 -1
- data/lib/sass/embedded/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a0b331e415afbb531c878df4a9cc1581f5ba8fed834272d7ddf213909f7e96b
|
4
|
+
data.tar.gz: fca106d6f9f3168ad5bea90b39dcaa4905de8802c83155e968b399fc4af62ee5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 275d74fd71008ddce5fa2cefc492288cceb95d93c82a832794949aa20eae0a56ec107ffa32bbabee05dd8a5a1caf13acd41530d4cc6a40e378d9f9e56accb4bc
|
7
|
+
data.tar.gz: 9115bb30cf0511073695f7f94e54236ccc817a158574b337c9f40e80088d885566f17a9b3382504d5a320a75477e16b342c1b863655aa6bb1cfc76ea2ff05a47
|
@@ -9,7 +9,7 @@ module Sass
|
|
9
9
|
# It runs the `dart-sass-embedded` process.
|
10
10
|
class Compiler
|
11
11
|
def initialize
|
12
|
-
@stdin, @stdout, @stderr, @wait_thread = Open3.popen3(PATH)
|
12
|
+
@stdin, @stdout, @stderr, @wait_thread = Open3.popen3(PATH, chdir: __dir__)
|
13
13
|
@stdin.binmode
|
14
14
|
@stdout.binmode
|
15
15
|
@stdin_mutex = Mutex.new
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sass
|
4
|
+
class Embedded
|
5
|
+
class Host
|
6
|
+
# An importer that never imports any stylesheets.
|
7
|
+
module NoOpImporter
|
8
|
+
module_function
|
9
|
+
|
10
|
+
def canonicalize(*); end
|
11
|
+
def load(*); end
|
12
|
+
end
|
13
|
+
|
14
|
+
private_constant :NoOpImporter
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/sass/embedded/host.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require_relative 'host/function_registry'
|
4
4
|
require_relative 'host/importer_registry'
|
5
5
|
require_relative 'host/logger_registry'
|
6
|
+
require_relative 'host/no_op_importer'
|
6
7
|
require_relative 'host/value_protofier'
|
7
8
|
|
8
9
|
module Sass
|
@@ -54,7 +55,15 @@ module Sass
|
|
54
55
|
source: source,
|
55
56
|
url: url&.to_s,
|
56
57
|
syntax: Protofier.to_proto_syntax(syntax),
|
57
|
-
importer:
|
58
|
+
importer: if importer
|
59
|
+
@importer_registry.register(importer)
|
60
|
+
elsif url
|
61
|
+
EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
|
62
|
+
path: File.absolute_path('.')
|
63
|
+
)
|
64
|
+
else
|
65
|
+
@importer_registry.register(NoOpImporter)
|
66
|
+
end
|
58
67
|
)
|
59
68
|
end,
|
60
69
|
path: path.nil? ? nil : File.absolute_path(path),
|
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: 1.2
|
4
|
+
version: 1.3.2
|
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-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -134,6 +134,7 @@ files:
|
|
134
134
|
- lib/sass/embedded/host/function_registry.rb
|
135
135
|
- lib/sass/embedded/host/importer_registry.rb
|
136
136
|
- lib/sass/embedded/host/logger_registry.rb
|
137
|
+
- lib/sass/embedded/host/no_op_importer.rb
|
137
138
|
- lib/sass/embedded/host/value_protofier.rb
|
138
139
|
- lib/sass/embedded/logger.rb
|
139
140
|
- lib/sass/embedded/logger/source_location.rb
|
@@ -159,8 +160,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
|
|
159
160
|
licenses:
|
160
161
|
- MIT
|
161
162
|
metadata:
|
162
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.2
|
163
|
-
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.2
|
163
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.3.2
|
164
|
+
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.3.2
|
164
165
|
funding_uri: https://github.com/sponsors/ntkme
|
165
166
|
post_install_message:
|
166
167
|
rdoc_options: []
|