Skip to content

An Angular-like CLI to automatically generate components for React

License

Notifications You must be signed in to change notification settings

CanobbioE/react-template-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Template Generator

A CLI to automatically generate repetitive code files from templates.

The idea is to have a tool like the Angular CLI for ReactTS and ReactNative.

Installation

On Windows, Linux, and macOS, you can use the pre-built binaries. You can then move the binary into any folder specified in your PATH environment variable. I suggest to rename the executable to rtg for an easier usage.

If you have Go 1.13+ you can build from source:

$ git clone github.com/CanobbioE/react-template-generator
$ cd react-template-generator
$ go install

Usage

Usage:
	rtg [OPTION] [OBJECT] NAME

Options:
	-g, --generate OBJECT NAME
		Generate a new OBJECT with the given NAME.
		Any of the following options is a valid OBJECT:
		  c, component   creates a new React Native component
		  x, screen      creates a new React Native screen

Example:
	rtg -g c MyComponent
	   Created ./components/MyComponent/MyComponent.tsx
	   Created ./components/MyComponent/MyComponentStyles.tsx

About

An Angular-like CLI to automatically generate components for React

Resources

License

Stars

Watchers

Forks

Packages

No packages published