2.0.1 • Published 6 years ago

nuh v2.0.1

Weekly downloads
8
License
SEE LICENSE IN LI...
Repository
github
Last release
6 years ago

Ghoti-CLI

:fish: A CLI tool that helps you start developing your new project within 60 seconds

Dependence

You might need typescript installed globally to reduce install time.

To install typescript

npm install -g typescript
# or
sudo npm install -g typescript

After install, you have to link typescript to every justcreated project by using:

npm link typescript
# or
sudo npm link typescript

If typescript is not installed globally, npm install will automatically install it for you.

Install

npm install -g ghoti-cli
# or
sudo npm install -g ghoti-cli

Usage

Init project

ghoti init [type] [path]

find available types with

ghoti info init

Extend project

ghoti component [component name]
ghoti page [page name]
ghoti lambda [lambda name]
ghoti func [func name]
ghoti feature [feature name]

Q & A

What is a component/page/lambda/func?

A component should be used as a reusable react class; a page is an unreusable react class, lambda and function are function sets.

What is the difference between lambda and function?

Lambda shall be developed with functional programming without side effect, like mapping a JSON to a simple array, and function is better to be used as logic codes.

What is a feature?

A feature is used to make use case scenario; when you are generating a feature, ghoti will automatically create a test file for you to test.

Am I have to use these structures?

No, you can use any function set you want, just init with type "react-unstructured".

Troubleshooting

You can always try ghoti help anywhere; npm run hint or ghoti fix in your created project to see if there is a trouble solution.

ghoti fix [error name] can help you find out if the error is already known when you know the error name.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.