@dolphjs/cli 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +60 -35
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,64 +1,89 @@
1
- # dolphjs cli
1
+ # DolphJS CLI
2
2
 
3
- The dolphjs-cli is a tool used for efficient initialization and management of a dolphjs project.
3
+ The `dolph` CLI is a powerful tool designed for the efficient initialization and management of DolphJS projects. Powered by Rust under the hood for blazing fast performance!
4
4
 
5
- ## Commands
6
-
7
- **new**: the alias for this command is `n`. This command is used to initialize / start a new project. It takes the name of the project as an option
5
+ ## Installation
8
6
 
9
7
  ```bash
10
- dolph-cli new <project-name>
8
+ npm install -g @dolphjs/cli
9
+ # or using pnpm
10
+ pnpm add -g @dolphjs/cli
11
11
  ```
12
12
 
13
- or use `' . '` in place of `<project-name>` to initialize the project in current directory.
13
+ ## Commands
14
14
 
15
- After this, you'll be prompted with few questions which would be used to configure your dolphjs project. Navigate to the project folder and run
15
+ ### `new`
16
+
17
+ This command is used to initialize and start a new project. It takes the name of the project as an option.
16
18
 
17
19
  ```bash
18
- yarn
20
+ dolph new <project-name>
19
21
  ```
20
22
 
21
- to install all packages .
23
+ Or use `.` in place of `<project-name>` to initialize the project in your current directory:
24
+ ```bash
25
+ dolph new .
26
+ ```
27
+
28
+ After running this, you'll be prompted with interactive questions to configure your new DolphJS project (Language, Architecture, Database, etc.).
22
29
 
23
- **generate**: the alias for this command is `g` and is used to generate files and folders with setup code for :
30
+ ### `generate` (or `g`)
24
31
 
25
- - controllers
26
- - services
27
- - models
28
- - routes
32
+ This command is used to quickly scaffold boilerplate files and folders with setup code. This ensures you are writing code the standard DolphJS way.
33
+
34
+ ```bash
35
+ dolph generate [OPTIONS]
36
+ ```
29
37
 
30
- It is recommended to make use of the `generate` command when one wants to create these files because it generates code the dolphjs way. In a scenario when you want to create files for all of the above, let's say you want to write code for user logic and functionalities, use the `-a` flag, as in:
38
+ **Options:**
39
+ - `-a, --all <NAME>`: Generates all dolphjs files for the named parameter
40
+ - `-c, --controller <NAME>`: Generates a dolphjs controller file
41
+ - `-d, --dto <NAME>`: Generates a dolphjs dto file
42
+ - `-e, --entity <NAME>`: Generates a dolphjs entity file
43
+ - `-i, --input <NAME>`: Generates a dolphjs input file
44
+ - `-k, --socket <NAME>`: Generates a dolphjs socket service and component
45
+ - `-m, --model <NAME>`: Generates a dolphjs models file
46
+ - `-r, --route <NAME>`: Generates a dolphjs routes file
47
+ - `-s, --service <NAME>`: Generates a dolphjs service file
48
+ - `-v, --resolver <NAME>`: Generates a dolphjs resolver file
49
+ - `-y, --component <NAME>`: Generates a dolphjs spring component file
50
+
51
+ **Example Usage:**
52
+
53
+ To generate a full set of files (controller, service, model, routes, etc.) for a `user` feature:
54
+ ```bash
55
+ dolph generate -a user
56
+ ```
31
57
 
58
+ To generate just a specific file, such as a controller:
32
59
  ```bash
33
- dolph-cli g -a user
60
+ dolph generate -c user
34
61
  ```
35
62
 
36
- the command above creates a service, controller, model and routes file for `user` and set's you up for writing business logic. Alternatively, you might want to create one of the files (controllers, models, services, routes) so you make use of their independent flags:
63
+ ### `build`
37
64
 
38
- - controller:
65
+ Builds the dolphjs typescript project into a javascript project for production.
39
66
 
40
- ```bash
41
- dolph-cli g -c <name>
42
- ```
67
+ ```bash
68
+ dolph build
69
+ ```
43
70
 
44
- - service:
71
+ ### `start`
45
72
 
46
- ```bash
47
- dolph-cli g -s <name>
48
- ```
73
+ Starts the dolphjs server in production mode.
49
74
 
50
- - model:
75
+ ```bash
76
+ dolph start
77
+ ```
51
78
 
52
- ```bash
53
- dolph-cli g -m <name>
54
- ```
79
+ ### `watch`
55
80
 
56
- - route:
81
+ Starts the dolphjs server in development mode (with hot-reloading).
57
82
 
58
- ```bash
59
- dolph-cli g -r <name>
60
- ```
83
+ ```bash
84
+ dolph watch
85
+ ```
61
86
 
62
87
  ## Credit
63
88
 
64
- dolphjs-cli is inspired by methane-cli [https://github.com/adedoyin-Emmanuel/methane-cli]
89
+ dolphjs-cli was originally inspired by methane-cli.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolphjs/cli",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "The dolphjs-cli is a tool for efficient initialization and management of a dolphjs project",
5
5
  "main": "./dist/index.js",
6
6
  "repository": "https://github.com/dolphjs/dolph-cli.git",