You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TODO: document stub publishing and (optional) config creation
23
+
Once installed, `dot-maker` is ready for usage, no need for extra configurations.
24
+
25
+
### (Optional) Add `dot-maker` to composer.json
26
+
27
+
Open `composer.json` and locate the `scripts` section.
28
+
If it does not exist, create it at the document's root level.
29
+
30
+
Register a new script by appending `"alias": "dot-maker"` to the `scripts` section, where **alias** can be any string you want; like, for example **make**.
31
+
32
+
```json
33
+
{
34
+
"scripts": {
35
+
"make": "dot-maker"
36
+
}
37
+
}
38
+
```
24
39
25
40
## Usage
26
41
42
+
Invoke `dot-maker` by executing:
43
+
44
+
- the bin file in your vendor directory, located at `./vendor/bin/dot-maker <component>`
45
+
- the (optional) Composer script created at [Setup](#setup): `composer make <component>`
46
+
47
+
where `<component>` is one of the following strings:
48
+
49
+
-`collection`: Creates a resource Collection (API only)
50
+
-`command`: Creates a CLI Command
51
+
-`entity`: Creates a Doctrine Entity and the matching Repository
52
+
-`form`: Creates a Laminas Form and the matching InputFilter
53
+
-`handler`: Creates the specified request Handlers (and additional files, based on the project type)
54
+
-`input-filter`: Creates an InputFilter
55
+
-`middleware`: Creates a Middleware
56
+
-`module`: Creates an entire Module
57
+
-`repository`: Creates a Doctrine Repository and the matching Entity
58
+
-`service`: Creates a Service and the matching ServiceInterface
59
+
60
+
### Create Collection
61
+
62
+
```shell
63
+
./vendor/bin/dot-maker collection
64
+
```
65
+
66
+
### Create Command
67
+
68
+
```shell
69
+
./vendor/bin/dot-maker command
70
+
```
71
+
72
+
### Create Entity + Repository
73
+
74
+
```shell
75
+
./vendor/bin/dot-maker entity
76
+
```
77
+
78
+
### Create Form
79
+
80
+
```shell
81
+
./vendor/bin/dot-maker form
82
+
```
83
+
84
+
### Create Handler
85
+
86
+
```shell
87
+
./vendor/bin/dot-maker handler
88
+
```
89
+
90
+
### Create InputFilter
91
+
92
+
```shell
93
+
./vendor/bin/dot-maker input-filter
94
+
```
95
+
96
+
### Create Middleware
97
+
98
+
```shell
99
+
./vendor/bin/dot-maker middleware
100
+
```
101
+
27
102
### Create Module
28
103
29
104
```shell
30
105
./vendor/bin/dot-maker module
31
106
```
32
107
33
-
TODO: add documentation for all commands that create types defined in src/Type/TypeEnum.php
0 commit comments