sassc-embedded 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5243561e8643bea221f2541af3faf2e00fb28c4d54842ee582f97f3e9784275d
4
- data.tar.gz: cfc193f4fbf98a125bd410578d228612ccd2974e76f40668366a389333ae1020
3
+ metadata.gz: 653470aa52eea5c7abe494d8ac3580ac2b5d7c1029286586751a73faf74aa55c
4
+ data.tar.gz: 99e69744a6cbc30974008b302929cb3eea966645ec9c199667180ce944eb58b3
5
5
  SHA512:
6
- metadata.gz: 92f34277c63720d77ebf60655e50472d26a5511dbd4d3f67a2dbf35ec459decd97764f1e6f72efcceca09c1fcb067ca4763690b287326f7f13383d930711ea3d
7
- data.tar.gz: 2369e12515b4609d0c38ccca4493b94eba2255783046dbaa1611ef21fb97e5ac8f6de5d8aac6ef3fea266642e5e0cf117407881c6e58f7a6328bcfc13d40f7ac
6
+ metadata.gz: 73f16f7eb7fae394d7ff2d7e98ae451e13caa17fc89cb89f55a17e572f869389c5d202ef0c0327610d00aaafcfeb9a8e5e610b0463c71d5ba0bf088a3f4af6c9
7
+ data.tar.gz: '03942b1cc4f56e4b84402143bf85f5d97dae0a7f3b89d43c1b5dc246526856c5a6cc5936609362c5eb8d584a5a2054c34624a37dec7724f9cbec530e931fc1bb'
data/README.md CHANGED
@@ -29,8 +29,13 @@ See [rubydoc.info/gems/sassc](https://rubydoc.info/gems/sassc) for full API docu
29
29
  ## Behavioral Differences from SassC Ruby
30
30
 
31
31
  1. Option `:style => :nested` behaves as `:expanded`.
32
+
32
33
  2. Option `:style => :compact` behaves as `:compressed`.
34
+
33
35
  3. Option `:precision` is ignored.
36
+
34
37
  4. Option `:line_comments` is ignored.
35
- 5. Argument `parent_path` in `Importer#imports` is set to value of option `:filename`.
36
- 6. See [the dart-sass documentation](https://github.com/sass/dart-sass#behavioral-differences-from-ruby-sass) for other differences.
38
+
39
+ 5. In `Importer#imports(path, parent_path)`, argument `path` is set to absolute path, and argument `parent_path` is set to value of option `:filename`.
40
+
41
+ See [the dart-sass documentation](https://github.com/sass/dart-sass#behavioral-differences-from-ruby-sass) for other differences.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SassC
4
4
  module Embedded
5
- VERSION = '1.0.2'
5
+ VERSION = '1.0.3'
6
6
  end
7
7
  end
@@ -39,7 +39,7 @@ module SassC
39
39
  @dependencies = result.loaded_urls
40
40
  .filter { |url| url.start_with?('file:') && url != file_url }
41
41
  .map { |url| Util.file_url_to_path(url) }
42
- @source_map = post_process_source_map(result.source_map)
42
+ @source_map = post_process_source_map(result.source_map)
43
43
 
44
44
  return post_process_css(result.css) unless quiet?
45
45
  rescue ::Sass::CompileError => e
@@ -232,8 +232,9 @@ module SassC
232
232
  imports = [imports]
233
233
  end
234
234
 
235
+ dirname = File.dirname(@importer.options.fetch(:filename, 'stdin'))
235
236
  contents = imports.map do |import|
236
- import_url = Util.path_to_file_url(File.absolute_path(import.path))
237
+ import_url = Util.path_to_file_url(File.absolute_path(import.path, dirname))
237
238
  @importer_results[import_url] = if import.source
238
239
  {
239
240
  contents: import.source,
@@ -247,7 +248,9 @@ module SassC
247
248
  end,
248
249
  source_map_url: if import.source_map_path
249
250
  Util.path_to_file_url(
250
- File.absolute_path(import.source_map_path, path)
251
+ File.absolute_path(
252
+ import.source_map_path, dirname
253
+ )
251
254
  )
252
255
  end
253
256
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassc-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
@@ -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.0.2
142
- source_code_uri: https://github.com/ntkme/sassc-embedded-polyfill-ruby/tree/v1.0.2
141
+ documentation_uri: https://rubydoc.info/gems/sassc-embedded/1.0.3
142
+ source_code_uri: https://github.com/ntkme/sassc-embedded-polyfill-ruby/tree/v1.0.3
143
143
  funding_uri: https://github.com/sponsors/ntkme
144
144
  post_install_message:
145
145
  rdoc_options: []