Skip to content

Easier config for 3rd party commands#42

Merged
erikaheidi merged 1 commit intomainfrom
command-sources
Jun 2, 2022
Merged

Easier config for 3rd party commands#42
erikaheidi merged 1 commit intomainfrom
command-sources

Conversation

@erikaheidi
Copy link
Copy Markdown
Member

This PR makes it easier to reference 3rd party commands from the vendor folder. Instead or providing a full path to the command path, such as: __DIR__ . '/vendor/namespace/command/Command', you can now simply use @namespace/command and the application will automatically expand that to the full path in the vendor folder.

I will be working to update the docs soon. As a TL;DR, now you can share and reuse Minicli commands . The procedure is:

  1. Create your command following the minicli/command-demo structure.
  2. Configure the composer.json for the command accordingly and submit it to Packagist.
  3. Require the command from your base Minicli app.
  4. Include a reference to the command in your app config. For instance:
$app = new App([
    'app_path' => [
            __DIR__ . '/app/Command',
            '@minicli/command-demo'
        ],
    'debug' => true
]);

And that should be all. More to come soon! :)

@erikaheidi erikaheidi merged commit ff06ade into main Jun 2, 2022
@WendellAdriel WendellAdriel deleted the command-sources branch December 15, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant