sassc-embedded 1.0.2 → 1.0.5

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: ba4aac10a3cd54af31dbc864abbb46373e7d3e60b70b8de8d29acbf4e3f012c9
4
+ data.tar.gz: 4df26b873c9019d0abb12b20c8d2b2c90ad3684cc3748faba6e17518240c8848
5
5
  SHA512:
6
- metadata.gz: 92f34277c63720d77ebf60655e50472d26a5511dbd4d3f67a2dbf35ec459decd97764f1e6f72efcceca09c1fcb067ca4763690b287326f7f13383d930711ea3d
7
- data.tar.gz: 2369e12515b4609d0c38ccca4493b94eba2255783046dbaa1611ef21fb97e5ac8f6de5d8aac6ef3fea266642e5e0cf117407881c6e58f7a6328bcfc13d40f7ac
6
+ metadata.gz: 8bc1d6a6eac3282c5e95e01411a76c639f49e7cf91cb970f33e2a4a5456a924bf3ccb9daba21ec8d2a42cdd04737f773ec1dacb571f23214c6ac64d20bfca778
7
+ data.tar.gz: b1a6d3d4c5d8a1a18d75aa0ae451ed900a8f9da0f22edfc4aec2ffe836f9307d4b3e7426744efa6ee73799d347e3e7cb8505305e84cef3906a75cd6b4cd4182d
data/README.md CHANGED
@@ -10,6 +10,21 @@ This library polyfills [`sassc`](https://github.com/sass/sassc-ruby) with the [`
10
10
 
11
11
  ## Install
12
12
 
13
+ Add these lines to your application's Gemfile:
14
+
15
+ ``` ruby
16
+ gem 'sassc', github: 'sass/sassc-ruby', ref: 'refs/pull/233/head'
17
+ gem 'sassc-embedded'
18
+ ```
19
+
20
+ And then execute:
21
+
22
+ ``` sh
23
+ bundle
24
+ ```
25
+
26
+ Or install it yourself as:
27
+
13
28
  ``` sh
14
29
  gem install sassc-embedded
15
30
  ```
@@ -29,8 +44,13 @@ See [rubydoc.info/gems/sassc](https://rubydoc.info/gems/sassc) for full API docu
29
44
  ## Behavioral Differences from SassC Ruby
30
45
 
31
46
  1. Option `:style => :nested` behaves as `:expanded`.
47
+
32
48
  2. Option `:style => :compact` behaves as `:compressed`.
49
+
33
50
  3. Option `:precision` is ignored.
51
+
34
52
  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.
53
+
54
+ 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`.
55
+
56
+ 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.5'
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
@@ -165,7 +165,7 @@ module SassC
165
165
  def arguments_from_native_list(native_argument_list)
166
166
  native_argument_list.map do |embedded_value|
167
167
  Script::ValueConversion.from_native embedded_value, @options
168
- end
168
+ end.compact
169
169
  end
170
170
 
171
171
  begin
@@ -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.5
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.5
142
+ source_code_uri: https://github.com/ntkme/sassc-embedded-polyfill-ruby/tree/v1.0.5
143
143
  funding_uri: https://github.com/sponsors/ntkme
144
144
  post_install_message:
145
145
  rdoc_options: []