Skip to content

CLI that helps automate some of the work necessary for using The Composable Architecture

License

Notifications You must be signed in to change notification settings

georgiIvanov/tcatool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

GitHub release

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. 🐍

Installation via Brew

  1. Open terminal and add tap brew tap georgiIvanov/tcatool
  2. brew install tcatool

Usage

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.

Example

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.

Contribution

Pull requests are welcome 👍

Please make sure PR conforms to the following requirements:

  1. Code follows all pylint conventions from the .pylintrc file.
  2. Functionality is unit tested.

About

CLI that helps automate some of the work necessary for using The Composable Architecture

Resources

License

Stars

Watchers

Forks

Packages

No packages published