-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from polywrap/chore/improve-rust-app-exp
chore(app-rust): improve rust app dev exp & ignore build folder
- Loading branch information
Showing
7 changed files
with
203 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ node_modules | |
target | ||
workflows/output.json | ||
wrap | ||
debug | ||
debug | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
implementations/app-rust/src/helpers/remove_module_suffix.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use handlebars::handlebars_helper; | ||
use serde_json::Value; | ||
|
||
handlebars_helper!(remove_module_suffix: |val: Value| { | ||
let type_val = val.as_str().unwrap(); | ||
_remove_module_suffix(type_val) | ||
}); | ||
|
||
pub fn _remove_module_suffix(type_val: &str) -> String { | ||
if type_val.ends_with("Module") { | ||
let new_type_val = type_val.strip_suffix("Module").unwrap(); | ||
return format!("{}", new_type_val); | ||
} | ||
return format!("{}", type_val); | ||
} |
Oops, something went wrong.