If you are using PointFree's Composable Architecture you have already noticed the benefits it brings in terms of testability, conciseness and modularisation.
For those who have already done a project or two with it, you have also probably observed how certain files are created again and again, subsequently modified to fit the task at hand.
tcatool is a CLI written in Python which aims at automating the drudgery of creating a new module/screen/view with TCA. 🐍
- Open terminal and add tap
brew tap georgiIvanov/tcatool
brew install tcatool
The gen
command takes a name with optional path and exclusion options -n (in case you don't want to generate all files).
By default it creates State, Action, Reducer, Environment and View.
Generated classes will be prefixed with the name variable.
Navigate from terminal to your project.
tcatool gen App
This will create 5 files (AppState, AppAction, AppReducer, AppEnvironment and AppView) at the current path.
To specify a particular directory you can use:
tcatool gen App /[Path]/[To]/[Files]
The tool will create all necessary directories if the don't exist already.
To exclude some files from being generated you can add the -n
option followed by the first letter of the file.
tcatool gen SignUp -nea
This will skip environment and action generation.
Pull requests are welcome 👍
Please make sure PR conforms to the following requirements:
- Code follows all pylint conventions from the
.pylintrc
file. - Functionality is unit tested.