@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.
- package/README.md +60 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,64 +1,89 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DolphJS CLI
|
|
2
2
|
|
|
3
|
-
The
|
|
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
|
-
##
|
|
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
|
-
|
|
8
|
+
npm install -g @dolphjs/cli
|
|
9
|
+
# or using pnpm
|
|
10
|
+
pnpm add -g @dolphjs/cli
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Commands
|
|
14
14
|
|
|
15
|
-
|
|
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
|
-
|
|
20
|
+
dolph new <project-name>
|
|
19
21
|
```
|
|
20
22
|
|
|
21
|
-
to
|
|
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
|
-
|
|
30
|
+
### `generate` (or `g`)
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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
|
|
60
|
+
dolph generate -c user
|
|
34
61
|
```
|
|
35
62
|
|
|
36
|
-
|
|
63
|
+
### `build`
|
|
37
64
|
|
|
38
|
-
|
|
65
|
+
Builds the dolphjs typescript project into a javascript project for production.
|
|
39
66
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
67
|
+
```bash
|
|
68
|
+
dolph build
|
|
69
|
+
```
|
|
43
70
|
|
|
44
|
-
|
|
71
|
+
### `start`
|
|
45
72
|
|
|
46
|
-
|
|
47
|
-
dolph-cli g -s <name>
|
|
48
|
-
```
|
|
73
|
+
Starts the dolphjs server in production mode.
|
|
49
74
|
|
|
50
|
-
|
|
75
|
+
```bash
|
|
76
|
+
dolph start
|
|
77
|
+
```
|
|
51
78
|
|
|
52
|
-
|
|
53
|
-
dolph-cli g -m <name>
|
|
54
|
-
```
|
|
79
|
+
### `watch`
|
|
55
80
|
|
|
56
|
-
-
|
|
81
|
+
Starts the dolphjs server in development mode (with hot-reloading).
|
|
57
82
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
83
|
+
```bash
|
|
84
|
+
dolph watch
|
|
85
|
+
```
|
|
61
86
|
|
|
62
87
|
## Credit
|
|
63
88
|
|
|
64
|
-
dolphjs-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.
|
|
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",
|