Skip to content
Snippets Groups Projects
Commit a739edbd authored by jurgenhaas's avatar jurgenhaas
Browse files

#1 Use filename .ahoy.l3d.yml for commands to be imported

parent b6d7738a
No related branches found
Tags v1.5.0
No related merge requests found
File moved
/vendor/
/.env
/composer.lock
/.ahoy.l3d
/.ahoy.yml
......@@ -10,7 +10,7 @@ It currently scans all composer packages with the pattern `lakedrops/*` and coll
## Prepare a LakeDrops plugin for Ahoy
When your comploser plugin should support this Ahoy framework, simply create a file called `.ahoy.yml` in the root of your plugin with content similar to this:
When your comploser plugin should support this Ahoy framework, simply create a file called `.ahoy.l3d.yml` in the root of your plugin with content similar to this:
```yaml
ahoyapi: v2
......
......@@ -3,7 +3,6 @@
namespace LakeDrops\Ahoy;
use LakeDrops\Component\Composer\BaseHandler;
use LakeDrops\Component\Composer\Utils;
use Symfony\Component\Yaml\Yaml;
/**
......@@ -23,7 +22,7 @@ class Handler extends BaseHandler {
/**
* Update ahoy scripts of all LakeDrops plugins.
*/
public function updateScripts() {
public function updateScripts(): void {
$this->init();
// We only do the fancy stuff for developers.
......@@ -44,8 +43,8 @@ class Handler extends BaseHandler {
$installationManager = $this->composer->getInstallationManager();
foreach ($this->composer->getRepositoryManager()->getLocalRepository()->search('lakedrops/*') as $pkg) {
$pluginRoot = $installationManager->getInstallPath($this->getPackage($pkg['name']));
if (file_exists($pluginRoot . '/.ahoy.yml')) {
$pluginAhoy = Yaml::parseFile($pluginRoot . '/.ahoy.yml');
if (file_exists($pluginRoot . '/.ahoy.l3d.yml')) {
$pluginAhoy = Yaml::parseFile($pluginRoot . '/.ahoy.l3d.yml');
foreach ($pluginAhoy['commands'] as $command => $commands) {
$ahoy['commands'][$command] = $commands;
if (isset($commands['imports']) && is_array($commands['imports'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment