sass-embedded 1.74.1-riscv64-linux-gnu

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +20 -0
  3. data/README.md +48 -0
  4. data/exe/sass +21 -0
  5. data/ext/sass/cli.rb +12 -0
  6. data/ext/sass/dart-sass/sass +20 -0
  7. data/ext/sass/dart-sass/src/LICENSE +1687 -0
  8. data/ext/sass/dart-sass/src/dart +0 -0
  9. data/ext/sass/dart-sass/src/sass.snapshot +0 -0
  10. data/ext/sass/embedded_sass_pb.rb +63 -0
  11. data/lib/sass/calculation_value/calculation_operation.rb +49 -0
  12. data/lib/sass/calculation_value.rb +22 -0
  13. data/lib/sass/canonicalize_context.rb +21 -0
  14. data/lib/sass/compile_result.rb +24 -0
  15. data/lib/sass/compiler/channel.rb +68 -0
  16. data/lib/sass/compiler/connection.rb +92 -0
  17. data/lib/sass/compiler/dispatcher.rb +115 -0
  18. data/lib/sass/compiler/host/function_registry.rb +87 -0
  19. data/lib/sass/compiler/host/importer_registry.rb +137 -0
  20. data/lib/sass/compiler/host/logger_registry.rb +55 -0
  21. data/lib/sass/compiler/host/protofier.rb +390 -0
  22. data/lib/sass/compiler/host/structifier.rb +37 -0
  23. data/lib/sass/compiler/host.rb +226 -0
  24. data/lib/sass/compiler/varint.rb +39 -0
  25. data/lib/sass/compiler.rb +212 -0
  26. data/lib/sass/elf.rb +276 -0
  27. data/lib/sass/embedded/version.rb +7 -0
  28. data/lib/sass/embedded.rb +107 -0
  29. data/lib/sass/embedded_protocol.rb +10 -0
  30. data/lib/sass/exception.rb +69 -0
  31. data/lib/sass/fork_tracker.rb +51 -0
  32. data/lib/sass/logger/silent.rb +28 -0
  33. data/lib/sass/logger/source_location.rb +22 -0
  34. data/lib/sass/logger/source_span.rb +28 -0
  35. data/lib/sass/node_package_importer.rb +17 -0
  36. data/lib/sass/serializer.rb +36 -0
  37. data/lib/sass/value/argument_list.rb +37 -0
  38. data/lib/sass/value/boolean.rb +52 -0
  39. data/lib/sass/value/calculation.rb +90 -0
  40. data/lib/sass/value/color.rb +253 -0
  41. data/lib/sass/value/function.rb +51 -0
  42. data/lib/sass/value/fuzzy_math.rb +80 -0
  43. data/lib/sass/value/list.rb +79 -0
  44. data/lib/sass/value/map.rb +71 -0
  45. data/lib/sass/value/mixin.rb +36 -0
  46. data/lib/sass/value/null.rb +48 -0
  47. data/lib/sass/value/number/unit.rb +186 -0
  48. data/lib/sass/value/number.rb +366 -0
  49. data/lib/sass/value/string.rb +61 -0
  50. data/lib/sass/value.rb +136 -0
  51. data/lib/sass-embedded.rb +4 -0
  52. metadata +120 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 906f80190883fa48a9bb96ba89572ac28e5ad28cafeaca3669c87d3058b1ee7e
4
+ data.tar.gz: b48fa228438b0d3db4f17b52966a9645173ef31c93beaa30c568bdb767bc7147
5
+ SHA512:
6
+ metadata.gz: 79840a5fb4eaf77ed6f1a6e204649de378a707b122e5995c8a5c47c5bdc6abc563662e93435c5bc78885f122aa33d9b3b00982bcaa1cd4288c11feea9a94bbbe
7
+ data.tar.gz: 8a1a9ffabc4348f1b3352b551d493c1d79f9e3be299ce0bd116136880cee67e4c7d841739ba576d662891999babdd3cf948f3fb825999d6aa409b8f1152e86ed
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2022, なつき
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # Embedded Sass Host for Ruby
2
+
3
+ [![build](https://github.com/sass-contrib/sass-embedded-host-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/sass-contrib/sass-embedded-host-ruby/actions/workflows/build.yml)
4
+ [![gem](https://badge.fury.io/rb/sass-embedded.svg)](https://rubygems.org/gems/sass-embedded)
5
+
6
+ This is a Ruby library that implements the host side of the [Embedded Sass protocol](https://github.com/sass/sass/blob/HEAD/spec/embedded-protocol.md).
7
+
8
+ It exposes a Ruby API for Sass that's backed by a native [Dart Sass](https://sass-lang.com/dart-sass) executable.
9
+
10
+ ## Install
11
+
12
+ ``` sh
13
+ gem install sass-embedded
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ The Ruby API provides two entrypoints for compiling Sass to CSS.
19
+
20
+ - `Sass.compile` takes a path to a Sass file and return the result of compiling that file to CSS.
21
+
22
+ ``` ruby
23
+ require 'sass-embedded'
24
+
25
+ result = Sass.compile('style.scss')
26
+ puts result.css
27
+
28
+ compressed = Sass.compile('style.scss', style: :compressed)
29
+ puts compressed.css
30
+ ```
31
+
32
+ - `Sass.compile_string` takes a string that represents the contents of a Sass file and return the result of compiling that file to CSS.
33
+
34
+ ``` ruby
35
+ require 'sass-embedded'
36
+
37
+ result = Sass.compile_string('h1 { font-size: 40px; }')
38
+ puts result.css
39
+
40
+ compressed = Sass.compile_string('h1 { font-size: 40px; }', style: :compressed)
41
+ puts compressed.css
42
+ ```
43
+
44
+ See [rubydoc.info/gems/sass-embedded/Sass](https://rubydoc.info/gems/sass-embedded/Sass) for full API documentation.
45
+
46
+ ---
47
+
48
+ Disclaimer: this is not an official Google product.
data/exe/sass ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative '../ext/sass/cli'
5
+
6
+ module Sass
7
+ # The `sass` command line interface
8
+ class CLI
9
+ begin
10
+ Kernel.exec(*COMMAND, *ARGV)
11
+ rescue Errno::ENOENT
12
+ require_relative '../lib/sass/elf'
13
+
14
+ raise if ELF::INTERPRETER.nil?
15
+
16
+ Kernel.exec(ELF::INTERPRETER, *COMMAND, *ARGV)
17
+ end
18
+ end
19
+
20
+ private_constant :CLI
21
+ end
data/ext/sass/cli.rb ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ class CLI
5
+ COMMAND = [
6
+ File.absolute_path('dart-sass/src/dart', __dir__).freeze,
7
+ File.absolute_path('dart-sass/src/sass.snapshot', __dir__).freeze
8
+ ].freeze
9
+ end
10
+
11
+ private_constant :CLI
12
+ end
@@ -0,0 +1,20 @@
1
+ #!/bin/sh
2
+
3
+ # This script drives the standalone dart-sass package, which bundles together a
4
+ # Dart executable and a snapshot of dart-sass.
5
+
6
+ follow_links() {
7
+ # Use `readlink -f` if it exists, but fall back to manually following symlnks
8
+ # for systems (like older Mac OS) where it doesn't.
9
+ file="$1"
10
+ if readlink -f "$file" 2>&-; then return; fi
11
+
12
+ while [ -h "$file" ]; do
13
+ file="$(readlink "$file")"
14
+ done
15
+ echo "$file"
16
+ }
17
+
18
+ # Unlike $0, $BASH_SOURCE points to the absolute path of this file.
19
+ path=`dirname "$(follow_links "$0")"`
20
+ exec "$path/src/dart" "$path/src/sass.snapshot" "$@"