Code Monkey home page Code Monkey logo

ghoti-cli's Introduction

Ghoti-CLI

npm version Build Status codecov Gitter downloads

๐ŸŸ A CLI tool that helps you start developing your new project within 60 seconds

Install

Install script

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 -

Install with NPM

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

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

Usage

Use ghoti ? or ghoti help for all available commands.

Init project

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.

External projects

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.