fix: found that macro name was nasty. Also my team starts a production with sabry, so lets call it release
This commit is contained in:
parent
4fa26061ee
commit
fc432ddde0
2 changed files with 50 additions and 50 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use proc_macro::TokenStream;
|
||||
use sabry_procmacro_impl::impls::{
|
||||
sassy::sassy_macro_impl, styly::styly_macro_impl, usey::usey_macro_impl,
|
||||
scssy::scssy_macro_impl, styly::styly_macro_impl, usey::usey_macro_impl,
|
||||
};
|
||||
|
||||
/// Macro that makes sass code rusty.
|
||||
|
|
@ -13,28 +13,28 @@ use sabry_procmacro_impl::impls::{
|
|||
/// ## Usage
|
||||
///
|
||||
/// ```ignore
|
||||
/// sassy!(scssmodule {
|
||||
/// scssy!(scssmodule {
|
||||
/// /* SCSS */
|
||||
/// });
|
||||
/// sassy!(sassmodule:sass {
|
||||
/// scssy!(sassmodule:sass {
|
||||
/// /* SASS (WIP) */
|
||||
/// });
|
||||
/// sassy!(scssmod2:scss {
|
||||
/// scssy!(scssmod2:scss {
|
||||
/// /* SCSS */
|
||||
/// });
|
||||
/// ```
|
||||
/// Or read code from file
|
||||
/// ```ignore
|
||||
/// sassy!(filemodule "src/styles/a.scss");
|
||||
/// sassy!(filemodule:sass "src/styles/b.sass");
|
||||
/// scssy!(filemodule "src/styles/a.scss");
|
||||
/// scssy!(filemodule:sass "src/styles/b.sass");
|
||||
/// ```
|
||||
///
|
||||
/// \[SCSS syntax requires 'scss' feature\]
|
||||
/// \[SASS syntax requires 'sass' feature (WIP)\]
|
||||
///
|
||||
#[proc_macro]
|
||||
pub fn sassy(input: TokenStream) -> TokenStream {
|
||||
sassy_macro_impl(input.into()).into()
|
||||
pub fn scssy(input: TokenStream) -> TokenStream {
|
||||
scssy_macro_impl(input.into()).into()
|
||||
}
|
||||
|
||||
/// Macro that brings sass code into app
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::{collections::HashSet, fs};
|
||||
|
||||
use sabry_procmacro::{sassy, usey};
|
||||
use sabry_procmacro::{scssy, usey};
|
||||
|
||||
sassy!(scmod:scss {"
|
||||
scssy!(scmod:scss {"
|
||||
@mixin abc(){
|
||||
color: red;
|
||||
}
|
||||
|
|
@ -10,18 +10,18 @@ sassy!(scmod:scss {"
|
|||
@include abc;
|
||||
}
|
||||
"});
|
||||
sassy!(samod:sass {"
|
||||
scssy!(samod:sass {"
|
||||
@mixin abc()
|
||||
color: green
|
||||
.sel1
|
||||
@include abc
|
||||
"});
|
||||
|
||||
sassy!(scmicromod:scss "sabry_procmacro/tests/scmicro.scss");
|
||||
sassy!(samicromod:sass "sabry_procmacro/tests/samicro.sass");
|
||||
scssy!(scmicromod:scss "sabry_procmacro/tests/scmicro.scss");
|
||||
scssy!(samicromod:sass "sabry_procmacro/tests/samicro.sass");
|
||||
|
||||
#[test]
|
||||
fn sassy_contract() {
|
||||
fn scssy_contract() {
|
||||
assert_eq!(scmod!(syntax), "scss");
|
||||
assert_eq!(
|
||||
scmod!(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue