A scaffold prototype code tool.
cargo install mdmg- Dowload a latest deb package from https://github.com/himanoa/mdmg/releases
dpkg -i mdmg_[version]_amd64.deb
Use homebrew
brew install -s himanoa/tap/mdmg
- Markdown driven
- Inspiration of scaffdog.
- Zero dependencies
- Zero configuration
- Don't use interactive shell.
- Easy to reuse from your script and text editor.
- Current Directory move to your project directory.
- Execute
mdmg setup. - Create a file similar to the following
.mdmg/${plan_name}.md.
## src/main.rs
```rust
fn main() -> Result<()> {
unimplemented!()
}
```- Execute
mdmg generate ${plan_name} foo.
Please write in the following format.
## file_name
```
file_body
```The key points are as follows.
- Write a filename in h2 tag
- Write a file body in code block where the next line
- ↑ is ok write multiple
Mdmg plan markdown can be use handlebars template.
Functions and variables that can be used.
identifyThe third argument of mdmg generate command.- Example.
mdmg generate foo bar=> bar
- Example.
pascal_case- Example
- identify: fooBarBaz
- template:
{{pascal_case identify}} - output: FooBarBaz
- Example
camel_case- Example
- identify: FooBarBaz
- template:
{{camel_case identify}} - output: fooBarBaz
- Example
kebab_case- Example
- identify: FooBarBaz
- template:
{{kebab_case identify}} - output: foo-bar-baz
- Example
snake_case- Example
- identify: FooBarBaz
- template:
{{snake_case identify}} - output: foo_bar_baz
- Example
env:- Example
- environment: FOO=12
- template:
{{env "FOO"}} - output: 12
- Example
Implementation => https://github.com/himanoa/mdmg/blob/master/src/template.rs
See https://github.com/himanoa/mdmg/blob/master/CONTRIBUTING.md