sassc-embedded 1.63.0 → 1.78.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -23
  3. data/lib/sassc/embedded/version.rb +1 -1
  4. data/lib/sassc/embedded.rb +266 -188
  5. data/vendor/github.com/sass/sassc-ruby/LICENSE.txt +22 -0
  6. data/vendor/github.com/sass/sassc-ruby/lib/sassc/dependency.rb +17 -0
  7. data/vendor/github.com/sass/sassc-ruby/lib/sassc/engine.rb +141 -0
  8. data/vendor/github.com/sass/sassc-ruby/lib/sassc/error.rb +37 -0
  9. data/vendor/github.com/sass/sassc-ruby/lib/sassc/functions_handler.rb +73 -0
  10. data/vendor/github.com/sass/sassc-ruby/lib/sassc/import_handler.rb +50 -0
  11. data/vendor/github.com/sass/sassc-ruby/lib/sassc/importer.rb +31 -0
  12. data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/native_context_api.rb +147 -0
  13. data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/native_functions_api.rb +159 -0
  14. data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/sass2scss_api.rb +10 -0
  15. data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/sass_input_style.rb +13 -0
  16. data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/sass_output_style.rb +12 -0
  17. data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/sass_value.rb +97 -0
  18. data/vendor/github.com/sass/sassc-ruby/lib/sassc/native/string_list.rb +10 -0
  19. data/vendor/github.com/sass/sassc-ruby/lib/sassc/native.rb +64 -0
  20. data/vendor/github.com/sass/sassc-ruby/lib/sassc/sass_2_scss.rb +9 -0
  21. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/functions.rb +8 -0
  22. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/bool.rb +32 -0
  23. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/color.rb +95 -0
  24. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/list.rb +136 -0
  25. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/map.rb +69 -0
  26. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/number.rb +389 -0
  27. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value/string.rb +96 -0
  28. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value.rb +137 -0
  29. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/base.rb +13 -0
  30. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/bool.rb +13 -0
  31. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/color.rb +18 -0
  32. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/list.rb +25 -0
  33. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/map.rb +21 -0
  34. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/number.rb +13 -0
  35. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion/string.rb +17 -0
  36. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script/value_conversion.rb +69 -0
  37. data/vendor/github.com/sass/sassc-ruby/lib/sassc/script.rb +17 -0
  38. data/vendor/github.com/sass/sassc-ruby/lib/sassc/util/normalized_map.rb +117 -0
  39. data/vendor/github.com/sass/sassc-ruby/lib/sassc/util.rb +231 -0
  40. data/vendor/github.com/sass/sassc-ruby/lib/sassc/version.rb +5 -0
  41. data/vendor/github.com/sass/sassc-ruby/lib/sassc.rb +64 -0
  42. metadata +49 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d7ed4c41b59c9da71323d18edaf73506cf634a2e9039fc050077a46acc0bb04
4
- data.tar.gz: 63a8b3809af3bb71724361f1bb1123486fd4f30b4e503d0c2ded02c9d05016e1
3
+ metadata.gz: 6436923b7f104059a6be6bf037be772b3191a12478b44457dcddd6dd2913e4b2
4
+ data.tar.gz: 81e184f8d2f343d23c7d8228e4cb62c7aa7343cfb609ff93aa3793b3af4abb05
5
5
  SHA512:
6
- metadata.gz: 1d1b9e29fb88ed4b1fa114ec9ff657b9b62f913da04a7201ceebd13e5d6c66d9228cae4076beb8319f7344372a592f78063ee9311e0c22fd47b02e8d9f61bba2
7
- data.tar.gz: f28204b7ca9218f562a7fae9984dbece8afaacd36f26ee9726eac40d7e90c4076f231a4e1138e0a0be9e229581920953b60f3e74542131dc74acbac10529fb95
6
+ metadata.gz: '09ad73cfc4311af1d2c2219b897a3d2a4393c7ed000736187bca650c94941470445a022f1299eb9d5ddb8defc118addb647560f8c703919e0319353a9d9acd63'
7
+ data.tar.gz: 6891a983e30abec954405faca7b83ab3f4f2d9ecfc72f4724319c82f90f8c29eed650d73f14efc85b7003eb97747cbc3b52bb34e9ae6ec9f342c41257a4817fd
data/README.md CHANGED
@@ -1,25 +1,34 @@
1
1
  # Embedded Sass Shim for SassC Ruby
2
2
 
3
- [![build](https://github.com/ntkme/sassc-embedded-shim-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/ntkme/sassc-embedded-shim-ruby/actions/workflows/build.yml)
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/ntkme/sass-embedded-host-ruby) implementation.
9
-
10
- It has been tested with:
11
-
12
- - [`sassc`](https://github.com/sass/sassc-ruby)
13
- - [`sassc-rails`](https://github.com/sass/sassc-rails)
14
- - [`sprockets`](https://github.com/rails/sprockets)
15
- - [`sprockets-rails`](https://github.com/rails/sprockets-rails)
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) [is deprecated](https://sass-lang.com/blog/libsass-is-deprecated/).
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 these lines to your application's Gemfile:
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
- See [rubydoc.info/gems/sassc](https://rubydoc.info/gems/sassc) for full API documentation.
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
- ## Behavioral Differences from SassC Ruby
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
- 1. Option `:style => :nested` and `:style => :compact` behave as `:style => :expanded`.
116
+ And then execute:
117
+
118
+ ``` sh
119
+ bundle
120
+ ```
59
121
 
60
- 2. Option `:precision` is ignored.
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
- 3. Option `:line_comments` is ignored.
124
+ #### Workaround Two
63
125
 
64
- See [the dart-sass documentation](https://github.com/sass/dart-sass#behavioral-differences-from-ruby-sass) for other differences.
126
+ Add this line to your application's code:
127
+
128
+ ``` ruby
129
+ require 'sassc-embedded'
130
+ ```
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SassC
4
4
  module Embedded
5
- VERSION = '1.63.0'
5
+ VERSION = '1.78.0'
6
6
  end
7
7
  end