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 +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +31 -43
- data/lib/sassc/engine.rb +6 -4
- data/lib/sassc/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a5d3bfaffbdbe013f744baa1b14bd5d8294b868affa00f0ca0c5f3f36e067d8
|
4
|
+
data.tar.gz: 8510a2aed9bc086f02e5a5371d4f46dea6eb8e7bdb35be2deb24599781f55cc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ae33ada6541e0309000dbabac776ae0ac39020a7a2870d3cb139ece6dcb527b0e2550e8473d8d8da9c0fc369f5dea64c40cbf50be47a985dddaef9ed4cf08cd
|
7
|
+
data.tar.gz: 5cf89bde4537c4c1eb1a3956b561a15db3a29620d491d8bbc792cc79bdfad37cd98cf7d6d2f4d108792ff47d6e1a72795b6ede27c5b74fbe5e4a31cf04d485f2
|
data/LICENSE.txt
CHANGED
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 [
|
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
|
-
|
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
|
12
|
-
C implmentation.)
|
12
|
+
which provides native binaries for Dart Sass instead of SassC (libsass).
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
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
|
-
|
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-
|
27
|
+
gem 'dartsass-sprockets'
|
35
28
|
```
|
36
29
|
|
37
|
-
|
30
|
+
### Upgrading to Dart Sass
|
38
31
|
|
39
|
-
|
40
|
-
|
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
|
62
|
-
* Credit to [Ryan Boland](https://ryanboland.com) and the authors of the original
|
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
|
-
|
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/
|
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
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
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
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.
|
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-
|
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
|
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.
|
165
|
-
source_code_uri: https://github.com/tablecheck/dartsass-ruby/tree/v3.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
|
184
|
+
summary: Use Dart Sass with Ruby
|
185
185
|
test_files: []
|