feat: relative style paths & component crate example

This commit is contained in:
Yiffy Dev 2024-11-16 22:32:38 +05:00 • committed by spushk
commit a13d592b20
Signed by: spushk
GPG key ID: 7797B761E105E8AA

View file

@ -17,7 +17,9 @@ styly!(pub const bundlemod {"
}
"});
styly!(pub filemod:sass "src/main.sass");
// relative path is available because 'nightly' feature flag is set.
// If you don't - this will be "src/main.sass"
styly!(pub const filemod:sass "./main.sass");
fn main() {
println!("someth class codemod styles: {}", bundlemod::someth);
@ -28,5 +30,6 @@ fn main() {
);
println!("#fox id will be: {}", bundlemod::thefox);
println!("Bundles const CSS will be: {}", BUNDLEMOD_CSS);
println!("Bundles const CSS from file will be: {}", FILEMOD_CSS); // false-positive from relative file.
println!("Thats how we used the styles! Good luck!!");
}