Comments (7)
Another design could be SourceTargetPairs []
Its not my use case but is more flexible.
{
"SourceTargetPairs": [
{
"Source": "Styles/MudBlazor.scss",
"Target": "wwwroot/MudBlazor.min.css"
},
{
"Source": "Styles/MudBlazor1.scss",
"Target": "wwwroot/MudBlazor1.min.css"
}]
"Arguments": "--style=compressed",
}
from aspnetcore.sasscompiler.
Hi @mikes-gh,
We directly pass the arguments to the dart-sass executable that does the conversion and creates the .css file. This does however mean that if you use a folder as the source you can't specify the resulting filename. You currently can already specify a filename for both SourceFolder and TargetFolder and I think that should work the same, however I agree it is confusing to have Folder in the setting.
I've wanted to allow multiple source/target folders/files so I think the approach in the last comment, at that point we can also allow different arguments per folder (and have the arguments outside of the pairs be the default if it is not specified for a specific pair). I'll try to create something for this in the coming days.
from aspnetcore.sasscompiler.
@sleeuwen Did you ever allow multiple sources and targets? I don't see anything explicitly about that in the readme. This would be ideal for my project where some files need to go in a wwwroot/css folder but others need to live in a wwwroot/lib folder.
from aspnetcore.sasscompiler.
You currently can already specify a filename for both SourceFolder and TargetFolder and I think that should work the same, however I agree it is confusing to have Folder in the setting.
AFAICS Specifying a source filename gives an error that its not a folder. It would be great if I could compile direct to a min.css filename as currently I have to add a target in my build for that and its a bit messy.
The output even if setting compressed is still plain .css which is confusing as not many ppl have a minified css without a min in the filename
from aspnetcore.sasscompiler.
would you accept a PR for the SourceTargetPairs
design or SourceTarget
?
from aspnetcore.sasscompiler.
Or an even simpler PR for MinifiedFileExtension
?
from aspnetcore.sasscompiler.
Hi @mikes-gh, We directly pass the arguments to the dart-sass executable that does the conversion and creates the .css file. This does however mean that if you use a folder as the source you can't specify the resulting filename. You currently can already specify a filename for both SourceFolder and TargetFolder and I think that should work the same, however I agree it is confusing to have Folder in the setting.
I've wanted to allow multiple source/target folders/files so I think the approach in the last comment, at that point we can also allow different arguments per folder (and have the arguments outside of the pairs be the default if it is not specified for a specific pair). I'll try to create something for this in the coming days.
@sleeuwen We are going to create this feature in our own fork since we need it now. I would be happy to contribute it back to the original repo and use that, as our preference would be to continue to support this excellent body of work. Let me know if you're interested.
from aspnetcore.sasscompiler.
Related Issues (20)
- Support architecture arm64 HOT 5
- Allow aliased file paths when importing through scss files HOT 1
- Non-Critical Question HOT 4
- net7 Support HOT 1
- Cannot build from clone HOT 1
- Exclude lib from build output when no runtime feature used HOT 2
- Source Maps Cannot be Disabled HOT 3
- Support Windows on Arm HOT 5
- Blazor WASM Net7.0 - Scss to css seems to happen after building the application HOT 2
- Publish path is incorrect HOT 1
- Problems with .NET 8 on build server (alpine amd64) with nuget path set HOT 2
- Can you install this Lib as a dev dependency HOT 6
- Missing license information
- Unit / Integration tests HOT 2
- Support for css isolation in Blazor Server on m1 Mac HOT 14
- System.TypeInitializationException: The type initializer for 'AspNetCore.SassCompiler.ChildProcessTracker' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'kernel32.dll' or one of its dependencies. HOT 4
- Docker + Alpine Linux - AspNetCore.SassCompiler.targets(11,5): error : Error running sass compiler: HOT 8
- In-process SASS processing HOT 1
- in-place compilation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnetcore.sasscompiler.