MVVMC-template
generate MVVMC template.
And we can use this template as Xcode template by copying MVVMC.xctemplate into ~/Library/Developer/Xcode/Templates.
generated files
- Coordinator
- CoordinatorTests
- Model
- ViewController
- ViewModel
- protocol
- ~ViewModeling
- inputs
- outputs
- CoordinatorOutputs
- protocol
Installation
Makefile
$ git clone git@github.com:ezura/MVVMC-template.git
$ cd MVVMC-template
$ make
Mint
$ mint install ezura/MVVMC-template
Usage
Generate files from template
$ mvvmc-template generate {Name}
Sort the implementation in the order of declaration in input/output protocol
$ mvvmc-template sort-impl {File or directory path}
or
$ mvvmc-template sort-implement {File or directory path}
Options
description | Option |
---|---|
Write copyright in header | --copyright or -C |
Write project name in header | --project_name or -P |
Output files as Xcode template | --xcode_template |
If you want to set copyright:
$ mvvmc-template generate --copyright "{copyright}" {Name}
or
$ mvvmc-template generate -C "{copyright}" {Name}
tasks
xctemplate
generate files
- ViewModel
- protocol
- ~ViewModeling
- inputs
- outputs
- CoordinatorOutputs
- protocol
- Coordinator
- CoordinatorTests
- Model
- ViewController
mode
- sort implement
improve feature
- header template
- customize template
- sync protocol and implement
- improve error message