🐟 A CLI tool that helps you start developing your new project within 60 seconds
curl -sSL https://raw.githubusercontent.com/WMXPY/Ghoti-CLI/master/bin/install.sh | sudo sh -
# or
wget -qO- https://raw.githubusercontent.com/WMXPY/Ghoti-CLI/master/bin/install.sh | sudo sh -
npm install -g ghoti-cli
# or
sudo npm install -g ghoti-cli
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 just created project by using:
# To link typescript to your project
npm link typescript
# or
sudo npm link typescript
If typescript
is not installed globally in your global npm node_modules path, npm install
will automatically install it for you.
Use ghoti ?
or ghoti help
for all available commands.
ghoti init [template] [project path]
Find available template with ghoti list
, for each template, you can use ghoti whatis [template]
to know more about it.
ghoti init -f [template link] [project path]
Use above command to install and init external template, you can also install it without init it
ghoti install [template link]
Check out some external templates ->HERE<-
ghoti component [component name]
ghoti page [page name]
ghoti lambda [lambda name]
ghoti func [func name]
ghoti feature [feature name]
A component should be used as a reusable react class; a page is an unreusable react class, lambda and function are function sets.
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.
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.
No, you can use any function set you want, just init with type "react-unstructured".
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]
like ghoti fix typescript is not a package
can help you find out if the error is already known when you know the error name.