Open SamHjelmfelt opened 2 months ago
I think sass_builder already does everything needed.
For jaspr_pad and other projects using it, running jaspr serve
or jaspr build
already also runs sass compilation. Not this only works for files inside ' web/', not 'lib/' (you can import files from 'lib/' but these will not be compiled itself to ' .css' counterparts).
Running jaspr build having sass_builder installed runs the builder for it but it raises an error that I have no clue where is coming from:
AssetNotFoundException: node_interop|pubspec.yaml
And jaspr fails to build.
I can't see exactly if is correct to post it here or in _nodeinterop, sass or _sassbuilder packages issues report.
You can try 'jaspr clean' before rebuilding.
Description The documentation only shows how to use css, but scss and sass are widely used. While Bulma is recommended in the documentation, it requires SCSS variables for theming, and it is not obvious how to get it working natively within Jaspr.
SASS is implemented using dart, so this should be relatively straightforward to integrate into the Jaspr build/serve process. https://sass-lang.com/dart-sass/
Additional Context
jaspr_pad has a sass folder and imports sass_builder, but simply importing "sass_builder: ^2.2.1" into a base jaspr project leads to an error: "[ERROR] AssetNotFoundException: node_interop|pubspec.yaml". It is not clear what else is required.
The approach that I was able to get working was to compile scss into css separate from Jaspr. For example, in development:
A few implementation ideas for Jaspr: