sasso 0.1.2-aarch64-linux → 0.2.0-aarch64-linux
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/sasso/3.1/sasso.so +0 -0
- data/lib/sasso/3.2/sasso.so +0 -0
- data/lib/sasso/3.3/sasso.so +0 -0
- data/lib/sasso/3.4/sasso.so +0 -0
- data/lib/sasso/version.rb +1 -1
- data/lib/sasso.rb +14 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79b136575613215f972146e541893eb649fffc630583e66128e8dc4edddc50f7
|
|
4
|
+
data.tar.gz: 5edaa9d40d363f357ef5fb4fb4571b3961fd854bfbb481e68395602ad5109b93
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a8e1c91c49b5958390f365a7bed3b54cecb3cb1257e4d560cda0f8ccb0f46be024292f85920fc0b63d35cb734485a26d408cecf96eb37f19e5c0f2e335b81f2
|
|
7
|
+
data.tar.gz: b75c1c232cd78329c3033d29cbce91486dc4c7eccef639d94ed971046f425e067b0cdf877b63719176e4ed885edab7e7b8021761bd84d3b416a03cc30689030f
|
data/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ notes the exact core crate version it pins.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.2.0] - 2026-06-14
|
|
12
|
+
|
|
13
|
+
Adopts core crate **v0.4.0**.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **Source map support.** `Sasso.compile_string(source, source_map: true)` (and
|
|
18
|
+
`Sasso.compile(path, source_map: true)`) returns a `Sasso::CompileResult` with
|
|
19
|
+
`#css` (the CSS String) and `#source_map` (the Source Map v3 as a parsed Hash:
|
|
20
|
+
`"version" => 3`, `"mappings"`, `"sources"`, …). Pass
|
|
21
|
+
`source_map_include_sources: true` to embed the full source text in the map's
|
|
22
|
+
`sourcesContent`. Without `source_map:` the methods still return a plain CSS
|
|
23
|
+
String (backwards compatible). The mappings are byte-identical to dart-sass.
|
|
24
|
+
|
|
11
25
|
## [0.1.2] - 2026-06-13
|
|
12
26
|
|
|
13
27
|
Adopts core crate **v0.3.1**.
|
data/lib/sasso/3.1/sasso.so
CHANGED
|
Binary file
|
data/lib/sasso/3.2/sasso.so
CHANGED
|
Binary file
|
data/lib/sasso/3.3/sasso.so
CHANGED
|
Binary file
|
data/lib/sasso/3.4/sasso.so
CHANGED
|
Binary file
|
data/lib/sasso/version.rb
CHANGED
data/lib/sasso.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "json"
|
|
3
4
|
require_relative "sasso/version"
|
|
4
5
|
|
|
5
6
|
module Sasso
|
|
@@ -10,6 +11,11 @@ module Sasso
|
|
|
10
11
|
# diagnostic (the same text the `sasso` CLI prints) when a `url:` is given,
|
|
11
12
|
# otherwise the legacy `Error: <msg> (line:col)` one-liner.
|
|
12
13
|
class CompileError < Error; end
|
|
14
|
+
|
|
15
|
+
# Returned by `compile_string`/`compile` when `source_map: true`. `#css` is the
|
|
16
|
+
# CSS String (identical to the plain-String return); `#source_map` is the
|
|
17
|
+
# Source Map v3 as a parsed Hash (`"version" => 3`, `"mappings"`, `"sources"`, …).
|
|
18
|
+
CompileResult = Struct.new(:css, :source_map)
|
|
13
19
|
end
|
|
14
20
|
|
|
15
21
|
# Load the compiled native extension. Precompiled ("fat") gems place a copy per
|
|
@@ -41,13 +47,18 @@ module Sasso
|
|
|
41
47
|
#
|
|
42
48
|
# Raises Sasso::CompileError on a compile failure; ArgumentError on bad options.
|
|
43
49
|
def compile_string(source, style: :expanded, syntax: :scss, indented: false,
|
|
44
|
-
load_paths: [], url: nil, alert_ascii: false
|
|
50
|
+
load_paths: [], url: nil, alert_ascii: false,
|
|
51
|
+
source_map: false, source_map_include_sources: false)
|
|
45
52
|
syntax = :sass if indented
|
|
46
53
|
validate!(style, STYLES, :style)
|
|
47
54
|
validate!(syntax, SYNTAXES, :syntax)
|
|
48
55
|
paths = Array(load_paths).map(&:to_s)
|
|
49
|
-
|
|
50
|
-
|
|
56
|
+
src = String(source)
|
|
57
|
+
return Sasso::Native._compile(src, style.to_s, syntax.to_s, paths, url && url.to_s, !alert_ascii) unless source_map
|
|
58
|
+
|
|
59
|
+
css, map_json = Sasso::Native._compile_with_map(src, style.to_s, syntax.to_s, paths,
|
|
60
|
+
url && url.to_s, !alert_ascii, source_map_include_sources)
|
|
61
|
+
CompileResult.new(css, JSON.parse(map_json))
|
|
51
62
|
end
|
|
52
63
|
|
|
53
64
|
# Compile the file at `path`. Syntax is inferred from the extension unless
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sasso
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- momiji-rs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|