dartsass-ruby 3.0.0 → 3.0.1

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: a89dda4fd651f7a90dc3bfb03ef4aeebb279f5e92ea2b99c970af0f88e3e5290
4
- data.tar.gz: 18acbc815964dc76364673e62fde9349c06a0c81731a74ea2932e68c0c047072
3
+ metadata.gz: 5a5d3bfaffbdbe013f744baa1b14bd5d8294b868affa00f0ca0c5f3f36e067d8
4
+ data.tar.gz: 8510a2aed9bc086f02e5a5371d4f46dea6eb8e7bdb35be2deb24599781f55cc3
5
5
  SHA512:
6
- metadata.gz: d0ba7bb44579c5a661894debb768fab28b4a5d9f1febe88a1f4d4a2565863e7956554d36d38b7037eb9329605571e322af6f728254b4ecdea88e880d80a333d0
7
- data.tar.gz: d12ae55b2e363cdca014d8b04fb29324ca69b2114951738117b15259d63877e8f11b23b99ea6942e192ae3c451b7b29387c22676adc96a3c2ec7ce012d6c6ce8
6
+ metadata.gz: 7ae33ada6541e0309000dbabac776ae0ac39020a7a2870d3cb139ece6dcb527b0e2550e8473d8d8da9c0fc369f5dea64c40cbf50be47a985dddaef9ed4cf08cd
7
+ data.tar.gz: 5cf89bde4537c4c1eb1a3956b561a15db3a29620d491d8bbc792cc79bdfad37cd98cf7d6d2f4d108792ff47d6e1a72795b6ede27c5b74fbe5e4a31cf04d485f2
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.1'
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.1
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-02-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sass-embedded
@@ -124,7 +124,7 @@ dependencies:
124
124
  - - "~>"
125
125
  - !ruby/object:Gem::Version
126
126
  version: 0.6.0
127
- description: Use Dart Sass with Ruby and Sprockets
127
+ description: Use Dart Sass with Ruby
128
128
  email:
129
129
  - ryan@tanookilabs.com
130
130
  - i@ntk.me
@@ -161,8 +161,8 @@ homepage: https://github.com/tablecheck/dartsass-ruby
161
161
  licenses:
162
162
  - MIT
163
163
  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
164
+ documentation_uri: https://rubydoc.info/gems/dartsass-ruby/3.0.1
165
+ source_code_uri: https://github.com/tablecheck/dartsass-ruby/tree/v3.0.1
166
166
  post_install_message:
167
167
  rdoc_options: []
168
168
  require_paths:
@@ -181,5 +181,5 @@ requirements: []
181
181
  rubygems_version: 3.4.4
182
182
  signing_key:
183
183
  specification_version: 4
184
- summary: Use Dart Sass with Ruby and Sprockets
184
+ summary: Use Dart Sass with Ruby
185
185
  test_files: []