mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-23 09:08:36 +02:00
refactor(derive-ahk): push up generation logic
This commit pushes as much of the generation logic as possible to the derive-ahk crate, so that when it is used in komorebic, we only need to do an as_bytes() call to prepare it for being written to a file. Besides that, this commit changes the generation command name to 'ahk-library' for clarity, and adds both additional samples and instructions in the readme file and Scoop post-install hook.
This commit is contained in:
@@ -83,13 +83,12 @@ pub fn ahk(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
|
||||
quote! {
|
||||
impl #name {
|
||||
fn ahk_functions() -> Vec<String> {
|
||||
let mut v: Vec<String> = vec![];
|
||||
v.push(String::from("; Generated by komorebic.exe ahk-lib"));
|
||||
fn generate_ahk_library() -> String {
|
||||
let mut v: Vec<String> = vec![String::from("; Generated by komorebic.exe")];
|
||||
|
||||
#stream
|
||||
|
||||
v
|
||||
v.join("\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user