dartsass-ruby 3.0.0 → 3.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a89dda4fd651f7a90dc3bfb03ef4aeebb279f5e92ea2b99c970af0f88e3e5290
4
- data.tar.gz: 18acbc815964dc76364673e62fde9349c06a0c81731a74ea2932e68c0c047072
3
+ metadata.gz: f1692f39e230d7f6a84b0fbf7e09862a2ad1fb8ae43e963b01ee3fcbc8f66b6b
4
+ data.tar.gz: dea8335b3a5b4977a75baf6fa01673954e0cfecb5d9c457b4a4d7c5ccd18605c
5
5
  SHA512:
6
- metadata.gz: d0ba7bb44579c5a661894debb768fab28b4a5d9f1febe88a1f4d4a2565863e7956554d36d38b7037eb9329605571e322af6f728254b4ecdea88e880d80a333d0
7
- data.tar.gz: d12ae55b2e363cdca014d8b04fb29324ca69b2114951738117b15259d63877e8f11b23b99ea6942e192ae3c451b7b29387c22676adc96a3c2ec7ce012d6c6ce8
6
+ metadata.gz: 4e95b6767ef57f7247712a6dcfde6647cbc92003abcadd85efb5bee25d81b50f6324b5e216df3602cdeb82f71f587cc3b8bf8a67d507530db43acdcad880b886
7
+ data.tar.gz: 734f7f729881753044e9fd4ea2aa5b0044d5b7bf934bbb0b300abf8ccbd0784db9b3faa4f307d3b498515b9cacfdb6fd96eb1106add22affd67792a1054bead0
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) Ryan Boland & Contributors
1
+ Copyright (c) Ryan Boland & contributors
2
2
  Copyright (c) Natsuki
3
3
  Copyright (c) TableCheck
4
4
 
data/README.md CHANGED
@@ -3,42 +3,41 @@
3
3
  [![build](https://github.com/tablecheck/dartsass-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/tablecheck/dartsass-ruby/actions/workflows/build.yml)
4
4
  [![gem](https://badge.fury.io/rb/dartsass-ruby.svg)](https://rubygems.org/gems/dartsass-ruby)
5
5
 
6
- Use [dart-sass](https://sass-lang.com/dart-sass) with Ruby and Sprockets.
6
+ Use [Dart Sass](https://sass-lang.com/dart-sass) with Ruby.
7
7
 
8
- This gem is a fork of [sass/sassc-ruby](https://github.com/sass/sassc-ruby)
9
- which maintains API compatibility but delegates to the
8
+ This gem is a fork of [sass/sassc-ruby](https://github.com/sass/sassc-ruby).
9
+ It is a compatibility shim which attempts to replicate SassC functionality
10
+ on Dart Sass, providing an easy upgrade path. Under-the-hood, this gem delegates to the
10
11
  [sass-embedded gem](https://github.com/ntkme/sass-embedded-host-ruby)
11
- which provides native binaries for Dart Sass (instead of the libsass
12
- C implmentation.)
12
+ which provides native binaries for Dart Sass instead of SassC (libsass).
13
13
 
14
- For ease of upgrading, the root namespace `::SassC` is still used by this gem,
15
- although it is now a misnomer. This is planned to be migrated in a future
16
- major version.
17
-
18
- ### Upgrading to Dart Sass
14
+ **Important:** When Dart Sass 2.0 is released, this gem will be sunset
15
+ and relevant code will be migrated to [dartsass-sprockets](https://github.com/tablecheck/dartsass-sprockets).
16
+ Please see [this issue](https://github.com/tablecheck/dartsass-sprockets/issues/2) for details.
19
17
 
20
- The interface of [sassc-ruby](https://github.com/sass/sassc-ruby) is largely unchanged, however:
21
-
22
- 1. Option `style: :nested` and `style: :compact` behave as `style: :expanded`. Use `style: :compressed` for minification.
23
- 2. Option `:precision` is ignored.
24
- 3. Option `:line_comments` is ignored.
25
- 4. `Sass2Scss` functionality has been removed.
26
-
27
- See [the dart-sass documentation](https://github.com/sass/dart-sass#behavioral-differences-from-ruby-sass) for other differences.
18
+ For ease of upgrading, the root namespace `::SassC` is still used by this gem,
19
+ although it is now a misnomer.
28
20
 
29
21
  ## Installation
30
22
 
31
- Add this line to your application's Gemfile:
23
+ Rails/Sprockets users are recommended to use [dartsass-sprockets](https://github.com/tablecheck/dartsass-sprockets)
24
+ instead of this gem directly. In your Gemfile:
32
25
 
33
26
  ```ruby
34
- gem 'dartsass-ruby'
27
+ gem 'dartsass-sprockets'
35
28
  ```
36
29
 
37
- Rails/Sprockets users should additionally add [sassc-rails](https://github.com/sass/sassc-rails):
30
+ ### Upgrading to Dart Sass
38
31
 
39
- ```ruby
40
- gem 'sassc-rails'
41
- ```
32
+ This gem is a drop-in replacement to [sassc-ruby](https://github.com/sass/sassc-ruby).
33
+ Note the following differences:
34
+
35
+ 1. Option `style: :nested` and `style: :compact` behave as `style: :expanded`. Use `style: :compressed` for minification.
36
+ 2. Option `:precision` is ignored, as Dart Sass sets it to a sufficiently high value.
37
+ 3. Option `:line_comments` is ignored and will always be disabled.
38
+ 4. `Sass2Scss` functionality has been removed.
39
+
40
+ See [the dart-sass documentation](https://github.com/sass/dart-sass#behavioral-differences-from-ruby-sass) for other differences.
42
41
 
43
42
  ## Usage
44
43
 
@@ -51,32 +50,21 @@ SassC::Engine.new(".klass1, .klass2 { color: :red; }", style: :compressed).rende
51
50
 
52
51
  ## Alternatives
53
52
 
54
- * [dartsass-rails](https://github.com/rails/dartsass-rails): Rails organization
55
- maintains its own wrapper for Dart Sass. Unlike this gem, dartsass-rails does
56
- not support Sprockets.
53
+ * [dartsass-rails](https://github.com/rails/dartsass-rails): The Rails organization
54
+ maintains its own wrapper for Dart Sass. Unlike this gem, dartsass-rails does
55
+ not support Sprockets.
57
56
 
58
57
  ## Credits
59
58
 
60
59
  * This gem is maintained and used in production by [TableCheck](https://www.tablecheck.com/en/join). (We'd be very glad if the Sass organization could take over maintainership in the future!)
61
- * Kudos to [@ntkme](https://github.com/ntkme) for dart-sass support.
62
- * Credit to [Ryan Boland](https://ryanboland.com) and the authors of the original sassc-rails gem.
60
+ * Kudos to [@ntkme](https://github.com/ntkme) for Dart Sass support and maintaining the [sass-embedded gem](https://github.com/ntkme/sass-embedded-host-ruby).
61
+ * Credit to [Ryan Boland](https://ryanboland.com) and the authors of the original
62
+ [sass/sassc-ruby](https://github.com/sass/sassc-ruby) gem.
63
63
  * See our [awesome contributors](https://github.com/tablecheck/sassc-ruby/graphs/contributors).
64
64
 
65
- ## Changelog
66
-
67
- See [CHANGELOG.md](CHANGELOG.md).
68
-
69
- ## Contributing
70
-
71
- ### Project Setup
72
-
73
- 1. Clone repo
74
- 1. Install dependencies - `bundle install`
75
- 1. Run the tests - `bundle exec rake test`
76
-
77
- ### Code Changes
65
+ ### Contributing
78
66
 
79
- 1. Fork it ([https://github.com/sass/sassc-ruby/fork](https://github.com/sass/sassc-ruby/fork))
67
+ 1. Fork it ([https://github.com/tablecheck/dartsass-ruby/fork](https://github.com/tablecheck/dartsass-ruby/fork))
80
68
  2. Create your feature branch (`git checkout -b my-new-feature`)
81
69
  3. Commit your changes (`git commit -am 'Add some feature'`) - try to include tests
82
70
  4. Push to the branch (`git push origin my-new-feature`)
data/lib/sassc/engine.rb CHANGED
@@ -182,10 +182,12 @@ module SassC
182
182
 
183
183
  url = URL.parse(source_map_file_url || file_url)
184
184
  data = JSON.parse(source_map)
185
- data["file"] = if validate_source_map_path?
186
- URL.parse(output_url).route_from(url).to_s
187
- else
188
- output_url
185
+ if output_url
186
+ data["file"] = if validate_source_map_path?
187
+ URL.parse(output_url).route_from(url).to_s
188
+ else
189
+ output_url
190
+ end
189
191
  end
190
192
  data["sources"].map! do |source|
191
193
  if source.start_with?(Protocol::FILE) && validate_source_map_path?
data/lib/sassc/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SassC
4
- VERSION = '3.0.0'
4
+ VERSION = '3.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dartsass-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Boland
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-02-03 00:00:00.000000000 Z
13
+ date: 2023-10-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sass-embedded
@@ -19,6 +19,9 @@ dependencies:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.54'
22
+ - - "<"
23
+ - !ruby/object:Gem::Version
24
+ version: '1.67'
22
25
  type: :runtime
23
26
  prerelease: false
24
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,6 +29,9 @@ dependencies:
26
29
  - - "~>"
27
30
  - !ruby/object:Gem::Version
28
31
  version: '1.54'
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: '1.67'
29
35
  - !ruby/object:Gem::Dependency
30
36
  name: minitest
31
37
  requirement: !ruby/object:Gem::Requirement
@@ -124,7 +130,7 @@ dependencies:
124
130
  - - "~>"
125
131
  - !ruby/object:Gem::Version
126
132
  version: 0.6.0
127
- description: Use Dart Sass with Ruby and Sprockets
133
+ description: Use Dart Sass with Ruby
128
134
  email:
129
135
  - ryan@tanookilabs.com
130
136
  - i@ntk.me
@@ -161,8 +167,8 @@ homepage: https://github.com/tablecheck/dartsass-ruby
161
167
  licenses:
162
168
  - MIT
163
169
  metadata:
164
- documentation_uri: https://rubydoc.info/gems/dartsass-ruby/3.0.0
165
- source_code_uri: https://github.com/tablecheck/dartsass-ruby/tree/v3.0.0
170
+ documentation_uri: https://rubydoc.info/gems/dartsass-ruby/3.0.2
171
+ source_code_uri: https://github.com/tablecheck/dartsass-ruby/tree/v3.0.2
166
172
  post_install_message:
167
173
  rdoc_options: []
168
174
  require_paths:
@@ -178,8 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
184
  - !ruby/object:Gem::Version
179
185
  version: '0'
180
186
  requirements: []
181
- rubygems_version: 3.4.4
187
+ rubygems_version: 3.4.12
182
188
  signing_key:
183
189
  specification_version: 4
184
- summary: Use Dart Sass with Ruby and Sprockets
190
+ summary: Use Dart Sass with Ruby
185
191
  test_files: []