sassc-embedded 1.63.0 → 1.80.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +89 -23
- data/lib/sassc/embedded/version.rb +1 -1
- data/lib/sassc/embedded.rb +282 -203
- data/vendor/github.com/sass/sassc-ruby/LICENSE.txt +22 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/dependency.rb +17 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/engine.rb +141 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/error.rb +37 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/functions_handler.rb +73 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/import_handler.rb +50 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/importer.rb +31 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/native_context_api.rb +147 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/native_functions_api.rb +159 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/sass2scss_api.rb +10 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/sass_input_style.rb +13 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/sass_output_style.rb +12 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/sass_value.rb +97 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/string_list.rb +10 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/native.rb +64 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/sass_2_scss.rb +9 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/functions.rb +8 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/bool.rb +32 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/color.rb +95 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/list.rb +136 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/map.rb +69 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/number.rb +389 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/string.rb +96 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value.rb +137 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/base.rb +13 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/bool.rb +13 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/color.rb +18 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/list.rb +25 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/map.rb +21 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/number.rb +13 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/string.rb +17 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion.rb +69 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/script.rb +17 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/util/normalized_map.rb +117 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/util.rb +231 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc/version.rb +5 -0
- data/vendor/github.com/sass/sassc-ruby/lib/sassc.rb +64 -0
- metadata +49 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bcb2ad67ca13ea4108da3411010d0ba6174be0c81344ba4e872c72a975de4e8
|
4
|
+
data.tar.gz: 7c4fb6fb6f586c1a1df518969919621684f7db14ee714565d09a7ba84aa944a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995360f534fdb95387ea7265bab5648d36ad1d87581c48343985b43552182c39b037f9636c6d46e0796f1c2fdf69c54e377b2a1618b696d3505a3766339240e4
|
7
|
+
data.tar.gz: 2bbb05391583018d90900043363bd97fec65626488c22d992518fc8b8c6fe23fde4f653cb7ec0fadb8ae48a67526bcbd7b4ff53236cce269eab8ee3bdf1fe407
|
data/README.md
CHANGED
@@ -1,25 +1,34 @@
|
|
1
1
|
# Embedded Sass Shim for SassC Ruby
|
2
2
|
|
3
|
-
[![build](https://github.com/
|
3
|
+
[![build](https://github.com/sass-contrib/sassc-embedded-shim-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/sass-contrib/sassc-embedded-shim-ruby/actions/workflows/build.yml)
|
4
4
|
[![gem](https://badge.fury.io/rb/sassc-embedded.svg)](https://rubygems.org/gems/sassc-embedded)
|
5
5
|
|
6
6
|
Use `sass-embedded` with SassC Ruby!
|
7
7
|
|
8
|
-
This library shims [`sassc`](https://github.com/sass/sassc-ruby) with the [`sass-embedded`](https://github.com/
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
- [`
|
13
|
-
- [`
|
14
|
-
- [`
|
15
|
-
- [`
|
8
|
+
This library shims [`sassc`](https://github.com/sass/sassc-ruby) with the [`sass-embedded`](https://github.com/sass-contrib/sass-embedded-host-ruby) implementation.
|
9
|
+
|
10
|
+
## Which Sass implementation should I use for my Ruby project?
|
11
|
+
|
12
|
+
- [`sass-embedded`](https://github.com/sass-contrib/sass-embedded-host-ruby) is recommended for all projects. It is compatible with:
|
13
|
+
- [`dartsass-rails >=0.5.0`](https://github.com/rails/dartsass-rails)
|
14
|
+
- [`haml >=6.0.9`](https://github.com/haml/haml)
|
15
|
+
- [`silm >=5.2.0`](https://github.com/slim-template/slim)
|
16
|
+
- [`sinatra >=3.1.0`](https://github.com/sinatra/sinatra)
|
17
|
+
- [`tilt >=2.0.11`](https://github.com/jeremyevans/tilt)
|
18
|
+
- [`sassc-embedded`](https://github.com/sass-contrib/sassc-embedded-shim-ruby) is recommended for existing projects still using `sassc` or `sprockets`. It is compatible with:
|
19
|
+
- [`dartsass-sprockets`](https://github.com/tablecheck/dartsass-sprockets)
|
20
|
+
- [`sassc`](https://github.com/sass/sassc-ruby)
|
21
|
+
- [`sassc-rails`](https://github.com/sass/sassc-rails)
|
22
|
+
- [`sprockets`](https://github.com/rails/sprockets)
|
23
|
+
- [`sprockets-rails`](https://github.com/rails/sprockets-rails)
|
24
|
+
- [`sassc`](https://github.com/sass/sassc-ruby) [has reached end-of-life](https://github.com/sass/sassc-ruby/blob/HEAD/README.md#sassc-has-reached-end-of-life).
|
25
|
+
- [`sass`](https://github.com/sass/ruby-sass) [has reached end-of-life](https://sass-lang.com/blog/ruby-sass-is-unsupported/).
|
16
26
|
|
17
27
|
## Install
|
18
28
|
|
19
|
-
Add
|
29
|
+
Add this line to your application's Gemfile:
|
20
30
|
|
21
31
|
``` ruby
|
22
|
-
gem 'sassc', github: 'sass/sassc-ruby', ref: 'refs/pull/233/head'
|
23
32
|
gem 'sassc-embedded'
|
24
33
|
```
|
25
34
|
|
@@ -35,12 +44,6 @@ Or install it yourself as:
|
|
35
44
|
gem install sassc-embedded
|
36
45
|
```
|
37
46
|
|
38
|
-
---
|
39
|
-
|
40
|
-
The fork of `sassc` at https://github.com/sass/sassc-ruby/pull/233 removes the libsass extension and loads the shim when `require 'sassc'` is invoked.
|
41
|
-
|
42
|
-
Alternatively, the original `sassc` gem can be used, but you must explictly call `require 'sassc-embedded'` to load the shim.
|
43
|
-
|
44
47
|
## Usage
|
45
48
|
|
46
49
|
This shim utilizes `sass-embedded` to allow you to compile SCSS or SASS syntax to CSS. To compile, use a `SassC::Engine`, e.g.:
|
@@ -51,14 +54,77 @@ require 'sassc-embedded'
|
|
51
54
|
SassC::Engine.new(sass, style: :compressed).render
|
52
55
|
```
|
53
56
|
|
54
|
-
|
57
|
+
Most of the original `sassc` options are supported with no behavior difference unless noted otherwise:
|
58
|
+
|
59
|
+
- `:filename`
|
60
|
+
- `:quiet`
|
61
|
+
- ~~`:precision`~~ - ignored
|
62
|
+
- ~~`:line_comments`~~ - ignored
|
63
|
+
- `:syntax`
|
64
|
+
- `:source_map_embed`
|
65
|
+
- `:source_map_contents`
|
66
|
+
- `:omit_source_map_url`
|
67
|
+
- `:source_map_file`
|
68
|
+
- `:importer`
|
69
|
+
- `:functions`
|
70
|
+
- `:style` - ~~`:nested`~~ and ~~`:compact`~~ behave as `:expanded`
|
71
|
+
- `:load_paths`
|
72
|
+
|
73
|
+
See [`sassc-ruby` source code](https://github.com/sass/sassc-ruby/blob/master/lib/sassc/engine.rb) and [`libsass` documentation](https://github.com/sass/libsass/blob/master/docs/api-context.md) for details.
|
74
|
+
|
75
|
+
Additional `sass-embedded` options are supported:
|
76
|
+
|
77
|
+
- `:charset`
|
78
|
+
- `:importers`
|
79
|
+
- `:alert_ascii`
|
80
|
+
- `:alert_color`
|
81
|
+
- `:fatal_deprecations`
|
82
|
+
- `:future_deprecations`
|
83
|
+
- `:logger`
|
84
|
+
- `:quiet_deps`
|
85
|
+
- `:silence_deprecations`
|
86
|
+
- `:verbose`
|
87
|
+
|
88
|
+
See [`sass-embedded` documentation](https://rubydoc.info/gems/sass-embedded/Sass#compile_string-class_method) for details.
|
89
|
+
|
90
|
+
## Troubleshooting
|
91
|
+
|
92
|
+
### The original `sassc` gem is still being used instead of `sassc-embedded`
|
93
|
+
|
94
|
+
When launching an application via `bundle exec`, it puts `sassc-embedded` at higher priority than `sassc` in `$LOAD_PATH`. You can verify the order of `$LOAD_PATH` with the following command:
|
95
|
+
|
96
|
+
``` ruby
|
97
|
+
bundle exec ruby -e 'puts $LOAD_PATH'
|
98
|
+
```
|
99
|
+
|
100
|
+
If you see `sassc` has higher priority than `sassc-embedded`, try remove `sassc`:
|
55
101
|
|
56
|
-
|
102
|
+
```
|
103
|
+
bundle remove sassc
|
104
|
+
```
|
105
|
+
|
106
|
+
If your application has a transitive dependency on `sassc` that cannot be removed, you can use one of the following workarounds.
|
107
|
+
|
108
|
+
#### Workaround One
|
109
|
+
|
110
|
+
Add this line to your application's Gemfile:
|
111
|
+
|
112
|
+
``` ruby
|
113
|
+
gem 'sassc', github: 'sass/sassc-ruby', ref: 'refs/pull/233/head'
|
114
|
+
```
|
57
115
|
|
58
|
-
|
116
|
+
And then execute:
|
117
|
+
|
118
|
+
``` sh
|
119
|
+
bundle
|
120
|
+
```
|
59
121
|
|
60
|
-
|
122
|
+
The fork of `sassc` at https://github.com/sass/sassc-ruby/pull/233 will load the shim whenever `require 'sassc'` is invoked, meaning no other code changes needed in your application.
|
61
123
|
|
62
|
-
|
124
|
+
#### Workaround Two
|
63
125
|
|
64
|
-
|
126
|
+
Add this line to your application's code:
|
127
|
+
|
128
|
+
``` ruby
|
129
|
+
require 'sassc-embedded'
|
130
|
+
```
|