EasyEngine v4 is built using PHP. If you have developed on WordPress and/or WP-CLI, you will find EasyEngine codebase a lot familiar.
Your development environment must have following.
git clone https://github.com/username/easyengine.git && git checkout develop
git remote add git@github.com:username/command-name.git
composer install
./bin/ee command
Clone the EasyEngine core repository locally and check out the development branch. – git clone git@github.com:EasyEngine/easyengine.git && git checkout develop
composer install --prefer-source
cd vendor/easyengine/command-name
git remote add <remote-name> git@github.com:username/command-name.git
./bin/ee command
git push <remote-name>
.Fork the command template repository and rename it to the command you want to create. This will now look like author/command-name
in your github.
Update the name
and homepage
in the composer.json
of the cloned repository. If the name is not updated properly then composer update/install with it will fail.
Clone the EasyEngine core repository locally and checkout the development branch – git clone git@github.com:EasyEngine/easyengine.git && git checkout develop
composer.json
in the EasyEngine core repository, add the following in require
– "author/command-name": "dev-master"
Also, append the following section in the composer.json
for development:
"repositories": {
"author/command-name": {
"type": "path",
"url": "path/to/your/forked/repository"
}
}
Or, you can add your repository to packagist and run composer reqiure author/command-name
.
composer update
in the core repository after this.hello-world
given in the template, it should give a success message as below by running it from the easyengine repository root:
./bin/ee hello-world Success: Hello world.
Note: These manual steps for setting up a new EasyEngine command will be replaced by a scaffold command.