Skip to content

Commit 6332c03

Browse files
author
Nabeel Shahzad
committed
Update composer file
1 parent f992022 commit 6332c03

File tree

2 files changed

+36
-10
lines changed

2 files changed

+36
-10
lines changed

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,36 @@
1-
# phpvms-plugin
1+
# phpvms-module
22

3-
Sample/template repository for a phpVMS plugin.
3+
Sample/template repository for a phpVMS plugin. See the full docs here: http://docs.phpvms.net/developers/add-ons-and-modules
4+
5+
## Generating a new module
6+
7+
The easiest way to generate a new module for phpVMS is to use the `artisan` command:
8+
9+
```
10+
php artisan module:make {ModuleName}
11+
```
12+
13+
That will create a module in the `modules` folder, which you can then copy out into its own repository and develop.
414

515
## Composer Configuration
616

7-
The `type` field needs to be set to "phpvms-plugin", and
17+
### Type
18+
19+
The `type` field needs to be set to "phpvms-module", and
820

921
```json
10-
"type": "phpvms-plugin",
22+
"type": "phpvms-module",
1123
"require": {}
24+
```
25+
26+
### Autoload
27+
28+
The path to your namespace must be set by the `autoload` section:
29+
30+
```json
31+
"autoload": {
32+
"psr-4": {
33+
"Modules\\Sample\\": "."
34+
}
35+
}
1236
```

composer.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "phpvms/sample-module",
3-
"type": "phpvms-plugin",
4-
"description": "",
3+
"type": "phpvms-module",
4+
"description": "A sample phpvms module",
55
"require": {
66
"composer/installers": "~1.0"
77
},
@@ -10,10 +10,12 @@
1010
"providers": [
1111
"Modules\\Sample\\Providers\\SampleServiceProvider",
1212
"Modules\\Sample\\Providers\\EventServiceProvider"
13-
],
14-
"aliases": {
15-
16-
}
13+
]
14+
}
15+
},
16+
"autoload": {
17+
"psr-4": {
18+
"Modules\\Sample\\": "."
1719
}
1820
}
1921
}

0 commit comments

Comments
 (0)