chore: 0.0.7: bump deps & light code cleanup
This commit is contained in:
parent
5d18f9201e
commit
8b8047de37
19 changed files with 601 additions and 2114 deletions
17
Cargo.toml
17
Cargo.toml
|
|
@ -9,7 +9,7 @@ members = [
|
||||||
exclude = ["examples"]
|
exclude = ["examples"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.0.6"
|
version = "0.0.7"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.88"
|
rust-version = "1.88"
|
||||||
authors = ["Svyatoslav Pushkarev <yiffyrusdev@yandex.ru>"]
|
authors = ["Svyatoslav Pushkarev <yiffyrusdev@yandex.ru>"]
|
||||||
|
|
@ -19,12 +19,12 @@ publish = true
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
## Workspace
|
## Workspace
|
||||||
sabry_intrnl = { path = "sabry_intrnl", version = "0.0.6" }
|
sabry_intrnl = { path = "sabry_intrnl", version = "0.0.7" }
|
||||||
sabry_procmacro = { path = "sabry_procmacro", version = "0.0.6" }
|
sabry_procmacro = { path = "sabry_procmacro", version = "0.0.7" }
|
||||||
sabry_procmacro_impl = { path = "sabry_procmacro_impl", version = "0.0.6" }
|
sabry_procmacro_impl = { path = "sabry_procmacro_impl", version = "0.0.7" }
|
||||||
sabry_build = { path = "sabry_build", version = "0.0.6" }
|
sabry_build = { path = "sabry_build", version = "0.0.7" }
|
||||||
## CSS
|
## CSS
|
||||||
lightningcss.version = "1.0.0-alpha.71"
|
lightningcss.version = "1.0.0-alpha.72"
|
||||||
lightningcss.default-features = false
|
lightningcss.default-features = false
|
||||||
grass.version = "^0.13"
|
grass.version = "^0.13"
|
||||||
grass.default-features = false
|
grass.default-features = false
|
||||||
|
|
@ -32,7 +32,7 @@ raffia.version = "^0.12"
|
||||||
## Marshall
|
## Marshall
|
||||||
serde.version = "^1"
|
serde.version = "^1"
|
||||||
toml.version = "^1"
|
toml.version = "^1"
|
||||||
base64.version = "^0.22"
|
base64.version = "^0.23"
|
||||||
regex.version = "^1"
|
regex.version = "^1"
|
||||||
## Util
|
## Util
|
||||||
itertools.version = "^0.14"
|
itertools.version = "^0.14"
|
||||||
|
|
@ -42,7 +42,7 @@ cfg-if.version = "^1"
|
||||||
thiserror.version = "^2"
|
thiserror.version = "^2"
|
||||||
proc-macro2.version = "^1"
|
proc-macro2.version = "^1"
|
||||||
quote.version = "^1"
|
quote.version = "^1"
|
||||||
syn.version = "^2"
|
syn.version = "^3"
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "sabry"
|
name = "sabry"
|
||||||
|
|
@ -73,6 +73,7 @@ procmacro = ["dep:sabry_procmacro"]
|
||||||
build = ["dep:sabry_build"]
|
build = ["dep:sabry_build"]
|
||||||
net-files = ["sabry_build/net-files"]
|
net-files = ["sabry_build/net-files"]
|
||||||
internals = []
|
internals = []
|
||||||
|
nightly = ["sabry_procmacro?/nightly"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
|
||||||
1278
examples/define-styles/Cargo.lock
generated
1278
examples/define-styles/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -6,4 +6,5 @@ rust-version = "1.88"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sabry = { path = "../../", features = ["nightly"] }
|
sabry.path = "../../"
|
||||||
|
sabry.features = ["nightly"]
|
||||||
|
|
|
||||||
|
|
@ -30,18 +30,19 @@ thiserror = "^1"
|
||||||
tracing.version = "0.1"
|
tracing.version = "0.1"
|
||||||
tracing.optional = true
|
tracing.optional = true
|
||||||
http = "^1"
|
http = "^1"
|
||||||
|
|
||||||
# sabry with sass
|
# sabry with sass
|
||||||
sabry = { path = "../../" }
|
sabry.path = "../../"
|
||||||
|
|
||||||
# our component library
|
# our component library
|
||||||
leptos-components = { path = "../leptos-components" }
|
leptos-components.version = "0.0.0"
|
||||||
|
leptos-components.path = "../leptos-components"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
# sabry for build with sass
|
# sabry for build with sass
|
||||||
sabry = { path = "../../", features = ["build"] }
|
sabry.path = "../../"
|
||||||
|
sabry.features = ["build"]
|
||||||
# lets depend on our styles
|
# lets depend on our styles
|
||||||
define-styles = { path = "../define-styles" }
|
define-styles.version = "0.0.0"
|
||||||
|
define-styles.path = "../define-styles"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
hydrate = ["leptos/hydrate"]
|
hydrate = ["leptos/hydrate"]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,32 @@
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
use sabry::styly;
|
use sabry::styly;
|
||||||
|
|
||||||
|
/// Renders the home page of your application.
|
||||||
|
#[component]
|
||||||
|
pub fn Route() -> impl IntoView {
|
||||||
|
// Creates a reactive value to update the button
|
||||||
|
let count = RwSignal::new(0);
|
||||||
|
let on_click = move |_| *count.write() += 1;
|
||||||
|
|
||||||
|
view! {class = STYLE,
|
||||||
|
<leptos_components::Aside/> // lets use our component
|
||||||
|
<section class=style::table>
|
||||||
|
<h2>"Welcome to Leptos"</h2>
|
||||||
|
<h2 class="">
|
||||||
|
"This head is styled with lepty-scopes feature"
|
||||||
|
<br/>
|
||||||
|
<span class="">"And this child too!"</span>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<button class=style::btn on:click=on_click>"Ima CRAZY button, clicked: " {count} " times!"</button>
|
||||||
|
<button class=style::_dark(style::btn) on:click=on_click>"Ima CRAZY button, clicked: " {count} " times!"</button>
|
||||||
|
<span class=style::card>"DISCLAIMER:"</span>
|
||||||
|
<p class=style::pocwarn>"This isn't a design example! Its just proof of sabry's capabilities."</p>
|
||||||
|
<p class=style::pocwarn>"Plz dont make websites/apps which look like this page :D"</p>
|
||||||
|
</section>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
styly!(style {"
|
styly!(style {"
|
||||||
@use 'tokens';
|
@use 'tokens';
|
||||||
@use 'utils';
|
@use 'utils';
|
||||||
|
|
@ -34,31 +60,4 @@ styly!(style {"
|
||||||
@include theme.surface(secondary);
|
@include theme.surface(secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
"});
|
"});
|
||||||
|
|
||||||
/// Renders the home page of your application.
|
|
||||||
#[component]
|
|
||||||
pub fn Route() -> impl IntoView {
|
|
||||||
// Creates a reactive value to update the button
|
|
||||||
let count = RwSignal::new(0);
|
|
||||||
let on_click = move |_| *count.write() += 1;
|
|
||||||
|
|
||||||
view! {class = STYLE,
|
|
||||||
<leptos_components::Aside/> // lets use our component
|
|
||||||
<section class=style::table>
|
|
||||||
<h2>"Welcome to Leptos"</h2>
|
|
||||||
<h2 class="">
|
|
||||||
"This head is styled with lepty-scopes feature"
|
|
||||||
<br/>
|
|
||||||
<span class="">"And this child too!"</span>
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<button class=style::btn on:click=on_click>"Ima CRAZY button, clicked: " {count} " times!"</button>
|
|
||||||
<button class=style::_dark(style::btn) on:click=on_click>"Ima CRAZY button, clicked: " {count} " times!"</button>
|
|
||||||
<span class=style::card>"DISCLAIMER:"</span>
|
|
||||||
<p class=style::pocwarn>"This isn't a design example! Its just proof of sabry's capabilities."</p>
|
|
||||||
<p class=style::pocwarn>"Plz dont make websites/apps which look like this page :D"</p>
|
|
||||||
</section>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "leptos-components"
|
name = "leptos-components"
|
||||||
version = "0.1.0"
|
version = "0.0.0"
|
||||||
rust-version = "1.88"
|
rust-version = "1.88"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
@ -12,12 +12,14 @@ crate-type = ["cdylib", "rlib"]
|
||||||
leptos.version = "^0.8"
|
leptos.version = "^0.8"
|
||||||
leptos_meta.version = "^0.8"
|
leptos_meta.version = "^0.8"
|
||||||
leptos_router.version = "^0.8"
|
leptos_router.version = "^0.8"
|
||||||
|
sabry.path = "../../"
|
||||||
sabry = { path = "../../", features = ["const-scoping"] }
|
sabry.features = ["const-scoping"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
sabry = { path = "../../", features = ["build", "const-scoping"] }
|
sabry.path = "../../"
|
||||||
define-styles = { path = "../define-styles" }
|
sabry.features = ["build", "const-scoping"]
|
||||||
|
define-styles.version = "0.0.0"
|
||||||
|
define-styles.path = "../define-styles"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
hydrate = ["leptos/hydrate"]
|
hydrate = ["leptos/hydrate"]
|
||||||
|
|
|
||||||
1137
examples/use-styles/Cargo.lock
generated
1137
examples/use-styles/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -6,11 +6,15 @@ rust-version = "1.88"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sabry = { path = "../../", features = ["nightly"] }
|
sabry.version = "0.0.7"
|
||||||
|
sabry.path = "../../"
|
||||||
|
sabry.features = ["nightly"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
sabry = { path = "../../", features = ["build", "nightly"] }
|
sabry.path = "../../"
|
||||||
define-styles = { path = "../define-styles" }
|
sabry.features = ["build"]
|
||||||
|
define-styles.version = "0.0.0"
|
||||||
|
define-styles.path = "../define-styles"
|
||||||
|
|
||||||
[package.metadata.sabry]
|
[package.metadata.sabry]
|
||||||
css.bundle = "target/static/style.css"
|
css.bundle = "target/static/style.css"
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,29 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sabry_build"
|
name = "sabry_build"
|
||||||
description = "Sabry build magic as a separate crate"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
repository.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
authors.workspace = true
|
description = "Sabry build magic as a separate crate"
|
||||||
|
repository.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sabry_intrnl.workspace = true
|
sabry_intrnl.workspace = true
|
||||||
sabry_intrnl.features = ["compile", "scope"]
|
sabry_intrnl.features = ["compile", "scope"]
|
||||||
sabry_procmacro_impl.workspace = true
|
sabry_procmacro_impl.workspace = true
|
||||||
sabry_procmacro_impl.features = ["const-compile"]
|
sabry_procmacro_impl.features = ["const-compile"]
|
||||||
|
|
||||||
syn.workspace = true
|
|
||||||
syn.features = ["visit", "derive", "parsing", "full"]
|
|
||||||
proc-macro2.workspace = true
|
proc-macro2.workspace = true
|
||||||
proc-macro2.features = ["span-locations"]
|
proc-macro2.features = ["span-locations"]
|
||||||
|
syn.workspace = true
|
||||||
|
syn.features = ["derive", "full", "parsing", "visit"]
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
walkdir.workspace = true
|
walkdir.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
net-files = []
|
net-files = []
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
|
||||||
all-features = true
|
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,13 @@ impl<'ast> Visit<'ast> for StylyVisitor {
|
||||||
node.mac.span()
|
node.mac.span()
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
let macro_data =
|
let source_path = self.path.parent().unwrap_or_else(|| {
|
||||||
styly::parse_macro_syntax(body, self.path.parent().map(|p| p.to_owned()))
|
panic!(
|
||||||
|
"could not find source_file at {:?}: none parent exists",
|
||||||
|
node.mac.span()
|
||||||
|
)
|
||||||
|
});
|
||||||
|
let macro_data = styly::parse_macro_syntax(body, source_path.to_owned())
|
||||||
.unwrap_or_else(|e| {
|
.unwrap_or_else(|e| {
|
||||||
panic!(
|
panic!(
|
||||||
"could not parse `styly!` macro at {:?}: {e:?}",
|
"could not parse `styly!` macro at {:?}: {e:?}",
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,33 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sabry_intrnl"
|
name = "sabry_intrnl"
|
||||||
description = "Sabry internal, yet still public library"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
repository.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
authors.workspace = true
|
description = "Sabry internal, yet still public library"
|
||||||
|
repository.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
syn.workspace = true
|
|
||||||
raffia.workspace = true
|
|
||||||
grass.workspace = true
|
|
||||||
grass.optional = true
|
|
||||||
lightningcss.workspace = true
|
|
||||||
lightningcss.optional = true
|
|
||||||
base64.workspace = true
|
|
||||||
base64.optional = true
|
|
||||||
|
|
||||||
thiserror.workspace = true
|
|
||||||
serde.workspace = true
|
|
||||||
serde.features = ["derive"]
|
|
||||||
toml.workspace = true
|
|
||||||
cfg-if.workspace = true
|
|
||||||
|
|
||||||
[features]
|
|
||||||
scope = ["dep:base64"]
|
|
||||||
compile = ["dep:lightningcss", "dep:grass"]
|
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
base64.workspace = true
|
||||||
|
base64.optional = true
|
||||||
|
grass.workspace = true
|
||||||
|
grass.optional = true
|
||||||
|
lightningcss.workspace = true
|
||||||
|
lightningcss.optional = true
|
||||||
|
raffia.workspace = true
|
||||||
|
syn.workspace = true
|
||||||
|
|
||||||
|
cfg-if.workspace = true
|
||||||
|
serde.workspace = true
|
||||||
|
serde.features = ["derive"]
|
||||||
|
thiserror.workspace = true
|
||||||
|
toml.workspace = true
|
||||||
|
|
||||||
|
[features]
|
||||||
|
compile = ["dep:grass", "dep:lightningcss"]
|
||||||
|
scope = ["dep:base64"]
|
||||||
|
|
|
||||||
|
|
@ -377,35 +377,43 @@ impl ScopedSelector {
|
||||||
|
|
||||||
#[cfg(feature = "scope")]
|
#[cfg(feature = "scope")]
|
||||||
pub fn sanitize_css_member(source: &str) -> String {
|
pub fn sanitize_css_member(source: &str) -> String {
|
||||||
let mut target = String::with_capacity(source.len());
|
let mut target = String::with_capacity(source.len() + 1);
|
||||||
let mut next_uppercase: bool = false;
|
|
||||||
for (i, c) in source
|
for part in source.split('-').filter(|p| !p.is_empty()) {
|
||||||
.chars()
|
let mut chars = part.chars().filter(|c| c.is_ascii() && c.is_alphanumeric());
|
||||||
.filter(|c| c.is_alphanumeric() || *c == '-')
|
match (chars.next(), chars.next()) {
|
||||||
.enumerate()
|
(None, None) => continue,
|
||||||
{
|
(Some(f), None) => {
|
||||||
// first gidit is prepended with 'n'
|
target.push(f);
|
||||||
if i == 0 && c.is_numeric() {
|
|
||||||
target.push('n');
|
|
||||||
target.push(c);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
(Some(f), Some(s)) => {
|
||||||
// dash is omitted, replacing the next char with its uppercase
|
target.push(f.to_ascii_uppercase());
|
||||||
if c == '-' {
|
target.push(s);
|
||||||
next_uppercase = true;
|
}
|
||||||
|
(None, Some(s)) => {
|
||||||
|
target.push(s);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let char = if next_uppercase {
|
|
||||||
next_uppercase = false;
|
|
||||||
c.to_ascii_uppercase()
|
|
||||||
} else {
|
|
||||||
c
|
|
||||||
};
|
|
||||||
|
|
||||||
target.push(char);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chars.for_each(|c| target.push(c));
|
||||||
|
}
|
||||||
|
|
||||||
|
match target.chars().next() {
|
||||||
|
Some(c) if c.is_numeric() => {
|
||||||
|
target.insert(0, 'n');
|
||||||
|
}
|
||||||
|
Some(c) => {
|
||||||
|
target.replace_range(..1, &c.to_ascii_lowercase().to_string());
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
/* has to produce valid rust ident */
|
||||||
|
target.clear();
|
||||||
|
target.push_str("unknown");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
target
|
target
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sabry_procmacro"
|
name = "sabry_procmacro"
|
||||||
description = "Sabry proc-macro declarations"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
repository.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
authors.workspace = true
|
description = "Sabry proc-macro declarations"
|
||||||
|
repository.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
|
|
@ -16,7 +20,4 @@ sabry_procmacro_impl.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
const-compile = ["sabry_procmacro_impl/const-compile"]
|
const-compile = ["sabry_procmacro_impl/const-compile"]
|
||||||
|
nightly = ["sabry_procmacro_impl/nightly"]
|
||||||
[package.metadata.docs.rs]
|
|
||||||
all-features = true
|
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,11 @@ use sabry_procmacro_impl::impls::{
|
||||||
///
|
///
|
||||||
#[proc_macro]
|
#[proc_macro]
|
||||||
pub fn scssy(input: TokenStream) -> TokenStream {
|
pub fn scssy(input: TokenStream) -> TokenStream {
|
||||||
let source_path =
|
let source_path = PathBuf::from_str(&proc_macro::Span::call_site().file())
|
||||||
PathBuf::from_str(&proc_macro::Span::call_site().file()).expect("Irrefutable result");
|
.expect("Irrefutable result")
|
||||||
|
.parent()
|
||||||
|
.expect("The scssy procmacro callsite source file has no parent dir")
|
||||||
|
.to_owned();
|
||||||
scssy_macro_impl(input.into(), source_path).into()
|
scssy_macro_impl(input.into(), source_path).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,30 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sabry_procmacro_impl"
|
name = "sabry_procmacro_impl"
|
||||||
description = "Sabry proc-macro internals reusable outside of proc-macro context"
|
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
repository.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
authors.workspace = true
|
description = "Sabry proc-macro internals reusable outside of proc-macro context"
|
||||||
|
repository.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
sabry_intrnl.workspace = true
|
|
||||||
sabry_intrnl.features = ["scope"]
|
|
||||||
raffia.workspace = true
|
|
||||||
syn.workspace = true
|
|
||||||
syn.features = ["parsing"]
|
|
||||||
quote.workspace = true
|
|
||||||
proc-macro2.workspace = true
|
|
||||||
proc-macro2.features = ["span-locations"]
|
|
||||||
regex.workspace = true
|
|
||||||
itertools.workspace = true
|
|
||||||
cfg-if.workspace = true
|
|
||||||
|
|
||||||
[features]
|
|
||||||
nightly = []
|
|
||||||
const-compile = ["sabry_intrnl/compile"]
|
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
cfg-if.workspace = true
|
||||||
|
itertools.workspace = true
|
||||||
|
proc-macro2.workspace = true
|
||||||
|
proc-macro2.features = ["span-locations"]
|
||||||
|
quote.workspace = true
|
||||||
|
raffia.workspace = true
|
||||||
|
regex.workspace = true
|
||||||
|
sabry_intrnl.workspace = true
|
||||||
|
sabry_intrnl.features = ["scope"]
|
||||||
|
syn.workspace = true
|
||||||
|
syn.features = ["parsing"]
|
||||||
|
|
||||||
|
[features]
|
||||||
|
const-compile = ["sabry_intrnl/compile"]
|
||||||
|
nightly = []
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ impl ArbitraryStyleBlock {
|
||||||
return Err(syn::Error::new(
|
return Err(syn::Error::new(
|
||||||
path_tok.span(),
|
path_tok.span(),
|
||||||
format!(
|
format!(
|
||||||
"Could not use path {path:?}: {:?}. If the path is relative and 'nightly' feature flag is set - this is likely false-positive",
|
"Could not use path {path:?}: {:?}. If the path is relative, nightly rust has to be used and `nightly` feature flag has to be set",
|
||||||
e.kind()
|
e.kind()
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -89,14 +89,12 @@ pub fn styly_macro_impl(input: TokenStream, source_path: PathBuf) -> TokenStream
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
let interp = interp.and_then(|i| match i.elements.first() {
|
interp.and_then(|i| match i.elements.first() {
|
||||||
Some(raffia::ast::SassInterpolatedIdentElement::Static(i)) => {
|
Some(raffia::ast::SassInterpolatedIdentElement::Static(i)) => {
|
||||||
Some(i.raw.to_string())
|
Some(i.raw.to_string())
|
||||||
}
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
})
|
||||||
|
|
||||||
interp
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.unique()
|
.unique()
|
||||||
|
|
|
||||||
9
tombi.toml
Normal file
9
tombi.toml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[[schemas]]
|
||||||
|
path = "tombi://www.schemastore.org/cargo.json"
|
||||||
|
include = ["Cargo.toml"]
|
||||||
|
format.rules.array-values-order.enabled = false
|
||||||
|
format.rules.table-keys-order.enabled = false
|
||||||
|
|
||||||
|
[[schemas.overrides]]
|
||||||
|
targets = ["workspace.dependencies", "dependencies", "dev-dependencies", "build-dependencies"]
|
||||||
|
format.rules = { table-keys-order.enabled = false }
|
||||||
Loading…
Reference in a new issue