From 3f7568cef56b5a867c7e4154b13883647cf1fb2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 18 Jul 2024 22:29:32 -0700 Subject: [PATCH] Document all supported SassC::Engine options --- README.md | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5ab0436..2b2717f 100644 --- a/README.md +++ b/README.md @@ -54,17 +54,38 @@ require 'sassc-embedded' SassC::Engine.new(sass, style: :compressed).render ``` -See [rubydoc.info/gems/sassc](https://rubydoc.info/gems/sassc) for full API documentation. - -## Behavioral Differences from SassC Ruby - -1. Option `:style => :nested` and `:style => :compact` behave as `:style => :expanded`. - -2. Option `:precision` is ignored. - -3. Option `:line_comments` is ignored. - -See [the dart-sass documentation](https://github.com/sass/dart-sass#behavioral-differences-from-ruby-sass) for other differences. +Most of the original `sassc` options are supported with no behavior difference unless noted otherwise: + +- `:filename` +- `:quiet` +- ~~`:precision`~~ - ignored +- ~~`:line_comments`~~ - ignored +- `:syntax` +- `:source_map_embed` +- `:source_map_contents` +- `:omit_source_map_url` +- `:source_map_file` +- `:importer` +- `:functions` +- `:style` - ~~`:nested`~~ and ~~`:compact`~~ behave as `:expanded` +- `:load_paths` + +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. + +Additional `sass-embedded` options are supported: + +- `:charset` +- `:importers` +- `:alert_ascii` +- `:alert_color` +- `:fatal_deprecations` +- `:future_deprecations` +- `:logger` +- `:quiet_deps` +- `:silence_deprecations` +- `:verbose` + +See [`sass-embedded` documentation](https://rubydoc.info/gems/sass-embedded/Sass#compile_string-class_method) for details. ## Troubleshooting