sasso-rails 0.1.2 → 0.1.3
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 +16 -0
- data/README.md +23 -2
- data/lib/generators/sasso/install/install_generator.rb +17 -2
- data/lib/sasso/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 182fa27772f53b3c1fbacd3befd6785adf4bac01018fb283e771e75cd4c1c53a
|
|
4
|
+
data.tar.gz: 3199c95dd402640b1408e998bf7879dd7aadcf352328e292a1e8700884be9df9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b7fd563419f880c4540fa2da7a28dfcc33b06d7cc4e898ef8669794938614e0b903fcbc4e96cb365451a98890d3dcd907ca1100b7a5262f75d96a17ff767149
|
|
7
|
+
data.tar.gz: 2599b9c1c5f0e84d76b713eabbaf1bb6068863551f3d7ab38fc6b5d3ae6f1f0a6103cbc0089e00fb640a27cadd476831cfa89204ad4d5d3bf5cb169f15592130
|
data/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,22 @@ the engine-gem version range it requires.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.1.3] - 2026-06-14
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **Sprockets `assets:precompile` crash (`LoadError: cannot load such file --
|
|
16
|
+
sassc`).** On a Sprockets app (e.g. a default Rails 7.0 app), the install
|
|
17
|
+
generator left the manifest's default `//= link_directory ../stylesheets .css`
|
|
18
|
+
directive in place, so Sprockets 4 tried to COMPILE the `application.scss`
|
|
19
|
+
entrypoint with its built-in `SasscProcessor` (`require "sassc"`, not
|
|
20
|
+
installed) — harmless in dev but crashing `assets:precompile` on deploy. The
|
|
21
|
+
generator now neutralizes that directive (sasso owns the compiled output,
|
|
22
|
+
served from `../builds`, which is linked separately). Idempotent, and a no-op
|
|
23
|
+
on Propshaft (no manifest). Rails 7.0 + Sprockets now precompiles cleanly;
|
|
24
|
+
Propshaft (Rails 7.1 / 8.x) is unaffected. Verified end-to-end across both
|
|
25
|
+
pipelines, plus a generator unit test.
|
|
26
|
+
|
|
11
27
|
## [0.1.2] - 2026-06-14
|
|
12
28
|
|
|
13
29
|
Requires the `sasso` gem **>= 0.2.0** (for its source-map API).
|
data/README.md
CHANGED
|
@@ -94,8 +94,6 @@ that directory as a source of ready-to-serve assets:
|
|
|
94
94
|
|
|
95
95
|
## Notes & limitations
|
|
96
96
|
|
|
97
|
-
- **Source maps are not supported yet.** The in-process compiler returns CSS
|
|
98
|
-
only; there is no `.css.map` output in any environment.
|
|
99
97
|
- **`builds` is file-to-file.** Each entry maps one input file to one output
|
|
100
98
|
file. There is no directory-glob form (no `"." => "."`); list each entrypoint
|
|
101
99
|
explicitly.
|
|
@@ -110,6 +108,29 @@ that directory as a source of ready-to-serve assets:
|
|
|
110
108
|
- **Watch is a 1s mtime poll** (dependency-free, no native fs-events); it covers
|
|
111
109
|
the source dir and `config.sasso.load_paths`.
|
|
112
110
|
|
|
111
|
+
## Troubleshooting
|
|
112
|
+
|
|
113
|
+
**`Bundler::GemNotFound: Could not find sasso-<version>-<platform>`** on
|
|
114
|
+
`bin/rails sasso:build` (or any boot) right after `bundle install`. The `sasso`
|
|
115
|
+
compiler ships as a **precompiled native gem**, so the lockfile must list your
|
|
116
|
+
platform. If Bundler resolved the version but didn't materialize the native
|
|
117
|
+
build for your arch, add the platform and re-install:
|
|
118
|
+
|
|
119
|
+
```console
|
|
120
|
+
$ bundle lock --add-platform arm64-darwin # or x86_64-linux, aarch64-linux, etc.
|
|
121
|
+
$ bundle install
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
This is a generic Bundler behaviour for precompiled native gems (the same step
|
|
125
|
+
`nokogiri` etc. need on CI/Docker), not specific to sasso — but you may hit it
|
|
126
|
+
on a first local install. To bake every supported platform into the lockfile up
|
|
127
|
+
front:
|
|
128
|
+
|
|
129
|
+
```console
|
|
130
|
+
$ bundle lock --add-platform x86_64-linux aarch64-linux \
|
|
131
|
+
x86_64-linux-musl aarch64-linux-musl arm64-darwin x86_64-darwin x64-mingw-ucrt
|
|
132
|
+
```
|
|
133
|
+
|
|
113
134
|
## Versioning
|
|
114
135
|
|
|
115
136
|
This gem versions independently of the `sasso` compiler gem and pins it with a
|
|
@@ -55,9 +55,24 @@ module Sasso
|
|
|
55
55
|
manifest = "app/assets/config/manifest.js"
|
|
56
56
|
full = File.join(destination_root, manifest)
|
|
57
57
|
return unless File.exist?(full)
|
|
58
|
-
return if File.read(full).include?("link_tree ../builds")
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
unless File.read(full).include?("link_tree ../builds")
|
|
60
|
+
append_to_file manifest, %(//= link_tree ../builds\n)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# The default Sprockets manifest links the stylesheets SOURCE directory
|
|
64
|
+
# (`//= link_directory ../stylesheets .css`). Sprockets 4 then tries to
|
|
65
|
+
# COMPILE our `application.scss` entrypoint with its built-in
|
|
66
|
+
# SasscProcessor, which `require "sassc"` — not installed on a default
|
|
67
|
+
# app — so `assets:precompile` crashes with
|
|
68
|
+
# `LoadError: cannot load such file -- sassc`. sasso owns the compiled
|
|
69
|
+
# output (served from ../builds, linked above), so the raw source dir
|
|
70
|
+
# must NOT be linked. Neutralize the directive — idempotent, since the
|
|
71
|
+
# regex only matches the live `//=` form (a re-run is a no-op).
|
|
72
|
+
gsub_file manifest,
|
|
73
|
+
%r{^([ \t]*)//=([ \t]*link_directory[ \t]+\.\./stylesheets\b.*)$},
|
|
74
|
+
"\\1//\\2 -- disabled by sasso-rails (sasso compiles ../stylesheets to ../builds; " \
|
|
75
|
+
"linking the source dir makes Sprockets compile .scss via sassc)"
|
|
61
76
|
end
|
|
62
77
|
|
|
63
78
|
def add_watch_to_procfile
|
data/lib/sasso/rails/version.rb
CHANGED
|
@@ -5,6 +5,6 @@ module Sasso
|
|
|
5
5
|
# Versioned INDEPENDENTLY of both the `sasso` gem and the `sasso` crate.
|
|
6
6
|
# The gemspec pins the engine gem with a range (sasso >= 0.1.1, < 1), so a
|
|
7
7
|
# compiler bump does not force a lockstep release of this integration gem.
|
|
8
|
-
VERSION = "0.1.
|
|
8
|
+
VERSION = "0.1.3"
|
|
9
9
|
end
|
|
10
10
|
end
|