Skip to content

Commit 62fb769

Browse files
authored
Merge pull request #11 from saucecodee/refactor
Refactor
2 parents 04c6a15 + 43eb276 commit 62fb769

File tree

3 files changed

+50
-38
lines changed

3 files changed

+50
-38
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[![BangaJS Logo](https://i.ibb.co/qr5jqrk/BangaJS.png)](https://bangajs.netlify.app/)
22

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

5+
[![NPM Version][npm-image]][npm-url]
6+
[![NPM Downloads][downloads-image]][downloads-url]
87

98
## Installation
109

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

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

2221
## Features
2322

24-
* Quick project setup
25-
* Generate Route, controller and Service files with CRUD methods.
23+
- Quick project setup
24+
- Generate Route, controller and Service files with CRUD methods.
2625

2726
## Docs
2827

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

3130
## Getting started
3231

33-
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:
32+
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:
3433

3534
```bash
36-
$ banga new hello-app
35+
$ banga new hello-world
3736
```
3837

39-
Then navigate into the newly created project and start up the server:
38+
Then navigate into the newly created project and start up the server:
4039

4140
```bash
42-
$ cd hello-app
41+
$ cd hello-world
4342
$ npm run dev
4443
```
4544

46-
By default the server will be running on http://localhost:2020/
45+
By default the server will be running on http://localhost:2020/
4746

4847
## People
4948

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

5453
## License
5554

56-
[MIT](LICENSE)
55+
[MIT](LICENSE)
5756

5857
[npm-image]: https://img.shields.io/npm/v/bangajs.svg
5958
[npm-url]: https://npmjs.com/package/bangajs

lib/cmd/help.js

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const help = {}
22

33
help.default =
44
`
5-
Generate production ready Nodejs application
5+
Build ExpressJS applications with speed and efficiency with BangaJS
66
77
88
Usage:
@@ -12,18 +12,11 @@ Usage:
1212
1313
Commands:
1414
15-
docs\t\t\tOpen the BangaJS documentation website
16-
generate\t\tGenerate and/or modify files
17-
help\t\t\ttLists available commands and options.
18-
new\t\t\tCreates a new workspace and an initial Banga app.
19-
version\t\tShow the BangaJS version information
20-
21-
22-
Options:
23-
24-
-h, --help\t\tLists available commands and options.
25-
-v, --version\t\tShow the BangaJS version information
26-
-f, --force\t\tWhen true, forces overwriting of existing files.
15+
docs\t\t\tOpens Banga docmentation in a browser
16+
generate\t\tGenerates and/or modifies files.
17+
help\t\t\tLists available commands and their descriptions.
18+
new\t\t\tCreates a new Express app.
19+
version\t\tDisplays Banga version.
2720
2821
2922
Run 'banga <command> --help' for more information on a command.
@@ -40,24 +33,44 @@ Usage:
4033
$ banga generate <type> <name> [<options>]
4134
4235
43-
type:
36+
Types:
37+
38+
a, asset\t\tCreate controller, model, route and service files.
39+
c, controller\t\tCreate controller file
40+
m, model\t\tCreate model file
41+
r, route\t\tCreate route file
42+
s, service\t\tCreate service file
43+
44+
45+
Options:
46+
--auth\t\tAdd auth middleware to routes
47+
--no-controller\tDo not create controller file
48+
--no-create\t\tDo not include create methods
49+
--no-crud\t\tDo not include CRUD methods
50+
--no-delete\t\tDo not include delete methods
51+
--force\t\tReplace file if it already exists
52+
--no-model\t\tDo not create model file
53+
--no-read\t\tDo not include read methods
54+
--root\t\tCreates file at the root of the current working directory
55+
--no-route\t\tDo not create route file
56+
--no-service\t\tDo not create service file
57+
--no-update\t\tDo not include update methods
4458
45-
a, asset\t\tOpen the BangaJS documentation website
46-
c, controller\t\tOpen the BangaJS documentation website
47-
m, model\t\tGenerate and/or modify files
48-
r, route\t\tLists available commands and options.
49-
s, service\t\tCreates a new workspace and an initial Banga app.
5059
`
5160

5261

5362
help.new =
5463
`
55-
Creates a new workspace and an initial Banga app.
56-
64+
Creates a new Express app.
5765
5866
Usage:
5967
60-
$ banga new <name> [<options>]
68+
$ banga new <app-name> [<options>]
69+
70+
71+
Options:
72+
--force\t\tReplace file if it already exists
73+
--no-auth\t\tDo not include User and authentication files
6174
`
6275

6376

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bangajs",
3-
"version": "0.1.0",
4-
"description": "Generate production ready Nodejs application in no time",
3+
"version": "0.2.0",
4+
"description": "Banga is a CLI generator for building ExpressJS applications with speed and efficiency.",
55
"main": "bin/index.js",
66
"bin": {
77
"banga": "bin/index.js"

0 commit comments

Comments
 (0)