Skip to content

Commit

Permalink
Merge pull request #11 from saucecodee/refactor
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
saucecodee authored Nov 3, 2020
2 parents 04c6a15 + 43eb276 commit 62fb769
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 38 deletions.
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[![BangaJS Logo](https://i.ibb.co/qr5jqrk/BangaJS.png)](https://bangajs.netlify.app/)

Banga is a cli generator for building [ExpressJS](https://expressjs.com) applications with speed and efficiency.

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
BangaJS is a cli generator for building [ExpressJS](https://expressjs.com) applications with speed and efficiency.

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]

## Installation

BangaJS is available on the [Node.js](https://nodejs.org/en/) module through the
It's available on the [Node.js](https://nodejs.org/en/) module through the
[npm registry](https://www.npmjs.com/).

Before installing, [download and install Node.js](https://nodejs.org/en/download/)
Expand All @@ -21,29 +20,29 @@ $ npm install bangajs -g

## Features

* Quick project setup
* Generate Route, controller and Service files with CRUD methods.
- Quick project setup
- Generate Route, controller and Service files with CRUD methods.

## Docs

* [Website and Documentation](https://bangajs.netlify.app/)
- [Website and Documentation](https://bangajs.netlify.app/)

## Getting started

Now let's create a new Express app named **hello-app**. It would be created in a new folder called **hello-app** in the current working directory:
Now let's create a new Express app **hello-world**. It would be created in a new folder called **hello-world** in the current working directory:

```bash
$ banga new hello-app
$ banga new hello-world
```

Then navigate into the newly created project and start up the server:
Then navigate into the newly created project and start up the server:

```bash
$ cd hello-app
$ cd hello-world
$ npm run dev
```

By default the server will be running on http://localhost:2020/
By default the server will be running on http://localhost:2020/

## People

Expand All @@ -53,7 +52,7 @@ The author of BangaJS is [Onyegbu Ifedili](https://github.com/saucecodee)

## License

[MIT](LICENSE)
[MIT](LICENSE)

[npm-image]: https://img.shields.io/npm/v/bangajs.svg
[npm-url]: https://npmjs.com/package/bangajs
Expand Down
57 changes: 35 additions & 22 deletions lib/cmd/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const help = {}

help.default =
`
Generate production ready Nodejs application
Build ExpressJS applications with speed and efficiency with BangaJS
Usage:
Expand All @@ -12,18 +12,11 @@ Usage:
Commands:
docs\t\t\tOpen the BangaJS documentation website
generate\t\tGenerate and/or modify files
help\t\t\ttLists available commands and options.
new\t\t\tCreates a new workspace and an initial Banga app.
version\t\tShow the BangaJS version information
Options:
-h, --help\t\tLists available commands and options.
-v, --version\t\tShow the BangaJS version information
-f, --force\t\tWhen true, forces overwriting of existing files.
docs\t\t\tOpens Banga docmentation in a browser
generate\t\tGenerates and/or modifies files.
help\t\t\tLists available commands and their descriptions.
new\t\t\tCreates a new Express app.
version\t\tDisplays Banga version.
Run 'banga <command> --help' for more information on a command.
Expand All @@ -40,24 +33,44 @@ Usage:
$ banga generate <type> <name> [<options>]
type:
Types:
a, asset\t\tCreate controller, model, route and service files.
c, controller\t\tCreate controller file
m, model\t\tCreate model file
r, route\t\tCreate route file
s, service\t\tCreate service file
Options:
--auth\t\tAdd auth middleware to routes
--no-controller\tDo not create controller file
--no-create\t\tDo not include create methods
--no-crud\t\tDo not include CRUD methods
--no-delete\t\tDo not include delete methods
--force\t\tReplace file if it already exists
--no-model\t\tDo not create model file
--no-read\t\tDo not include read methods
--root\t\tCreates file at the root of the current working directory
--no-route\t\tDo not create route file
--no-service\t\tDo not create service file
--no-update\t\tDo not include update methods
a, asset\t\tOpen the BangaJS documentation website
c, controller\t\tOpen the BangaJS documentation website
m, model\t\tGenerate and/or modify files
r, route\t\tLists available commands and options.
s, service\t\tCreates a new workspace and an initial Banga app.
`


help.new =
`
Creates a new workspace and an initial Banga app.
Creates a new Express app.
Usage:
$ banga new <name> [<options>]
$ banga new <app-name> [<options>]
Options:
--force\t\tReplace file if it already exists
--no-auth\t\tDo not include User and authentication files
`


Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bangajs",
"version": "0.1.0",
"description": "Generate production ready Nodejs application in no time",
"version": "0.2.0",
"description": "Banga is a CLI generator for building ExpressJS applications with speed and efficiency.",
"main": "bin/index.js",
"bin": {
"banga": "bin/index.js"
Expand Down

0 comments on commit 62fb769

Please sign in to comment.