Skip to content

Commit 15665c3

Browse files
committed
Document make:addon CLI command
1 parent 0874119 commit 15665c3

File tree

4 files changed

+53
-7
lines changed

4 files changed

+53
-7
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# `make:addon`
2+
3+
Generates required add-on files in the `system/user/addons` directory.
4+
5+
TIP: Read the [Add-on Development Overview](development/addon-development-overview.md) to learn more about creating an add-on.
6+
7+
## Options list:
8+
9+
The first (unnamed) parameter is the add-on name.
10+
11+
Other options are:
12+
```
13+
--version=<value>
14+
-v <value>
15+
Version of the add-on
16+
17+
--description=<value>
18+
-d <value>
19+
Description of the add-on
20+
21+
--author=<value>
22+
-a <value>
23+
Author of the add-on
24+
25+
--author-url=<value>
26+
-u <value>
27+
Author url of the add-on
28+
```
29+
## Examples:
30+
31+
### Interactive example
32+
```
33+
$ php system/ee/eecli.php make:addon
34+
Let's build your add-on!
35+
What is the name of your add-on? Amazing Add-On
36+
Add-on description? [Amazing Add-on description] This add-on does amazing things!
37+
Add-on version? [1.0.0]1.0.0
38+
Add-on author? ExpressionEngine Developer
39+
Add-on author URL? www.expressionengine.com
40+
Let's build!
41+
Your add-on has been created successfully!
42+
```
43+
44+
### One-line example
45+
46+
`php ../../system/ee/eecli.php make:addon "My Example Addon" -v 0.1.0 -d "Some good description" -a "ExpressionEngine" -u https://expressionengine.com`

docs/cli/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ By default the CLI is located `system/ee/eecli.php` .
1212
- [List](cli/built-in-commands/list.md)
1313
- Make
1414
- [make:action - Creates a new action for an add-on](cli/built-in-commands/make-action.md)
15-
- [make:addon - Creates a new add-on](development/addon-development-overview.md)
15+
- [make:addon - Creates a new add-on](cli/built-in-commands/make-addon.md)
1616
- [make:command - Creates a new CLI command for an add-on](cli/built-in-commands/make-command.md)
1717
- [make:extension-hook - Implements an EE extension hook in an add-on](cli/built-in-commands/make-extension-hook.md)
1818
- [make:migration - Creates a new migration](cli/built-in-commands/make-migration.md)

docs/development/add-on-update-file.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
## Overview
1313

14-
The `upd.[addon_name].php` file (commonly just called the `upd` file) is critical to ExpressionEngine knowing what to do with your add-on. Here we tell ExpressionEngine what actions to register, core hooks we want to use, database tables to update, and much more. We need to tell ExpressionEngine what to do when we install an add-on, update an add-on, and uninstall and add-on. Thankfully the CLI takes care of most of this for us.
14+
The `upd.[addon_name].php` file (commonly just called the `upd` file) is critical to ExpressionEngine knowing what to do with your add-on. Here we tell ExpressionEngine what actions to register, core hooks we want to use, database tables to update, and much more. We need to tell ExpressionEngine what to do when we install an add-on, update an add-on, and uninstall and add-on. Thankfully the CLI takes care of most of this for us.
1515

1616
TIP:When using the CLI, your add-on update file will automatically be created for you. See [Building An Add-On: Getting Started](development/addon-development-overview.md#getting-started) for how to generate the starter files for your add-on.
1717

1818
## Initial Setup
1919

20-
When you first create your add-on using the [`make:addon`](development/addon-development-overview.md) command from the CLI, a `upd` file is created for you in the root of your add-on.
20+
When you first create your add-on using the [`make:addon`](cli/built-in-commands/make-addon.md) command from the CLI, a `upd` file is created for you in the root of your add-on.
2121

2222
Here I have created an add-on called Amazing Add-on using the CLI.
2323

@@ -131,12 +131,12 @@ Be sure that you also update your [`install()` function](#adding-publish-tabs) t
131131

132132

133133
## Update Your Add-on (`update()`)
134-
The `update` method will run code when a user installs an update to our add-on.
134+
The `update` method will run code when a user installs an update to our add-on.
135135

136136
| Parameter | Type | Description |
137137
| --------- | --------- | ------------------------------------------------------------------ |
138138
| \$current | `string` | The last recorded version of the module in the `exp_modules` table |
139-
| Returns | `Boolean` | `FALSE` if no update is needed, `TRUE` otherwise
139+
| Returns | `Boolean` | `FALSE` if no update is needed, `TRUE` otherwise
140140

141141
public function update($current = '')
142142
{
@@ -150,7 +150,7 @@ The `update` method will run code when a user installs an update to our add-on.
150150
// update database
151151
// notify mission control of the update
152152
}
153-
153+
154154

155155
return true;
156156
}

docs/development/addon-development-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Here are some ideas of what you can accomplish with a custom add-on:
3232
These are just a few ideas of what you can do with custom add-ons. The possibilities are almost endless.
3333

3434
## Getting Started
35-
Getting started making an add-on is incredibly easy with the CLI. To begin making an add-on, simply use the `make:addon` command from the [CLI](cli/intro.html).
35+
Getting started making an add-on is incredibly easy with the CLI. To begin making an add-on, simply use the [`make:addon` command](/cli/built-in-commands/make-addon.md) from the [CLI](/cli/intro.html).
3636

3737
TIP: If you are working with an existing add-on, we recommend you start with [Modernizing add-ons](development/modernizing-existing-add-ons.md)
3838

0 commit comments

Comments
 (0)