Open greg-1-anderson opened 7 years ago
I would prefer this method for plugins too. I think it is confusing to tell people to make two directories within $HOME
: $HOME/terminus
for Terminus and $HOME/.terminus
for plugins.
I'm interested in helping move this along. Sounds like a "one-true-approach" to installing plugins is desired, and it sounds like per #1498 that a composer-based approach is desired over a terminus-based approach?
Would be great to nail down a direction that we can start building toward.
@thom8 had a good idea in https://github.com/acquia/blt/issues/1793
a composer-based approach is desired over a terminus-based approach?
One of the initial driving requirements for Terminus plugins was that it had to be possible for someone to just drop a couple of files in the right location in the filesystem in order to get started.
The plugin manager added the additional requirement that a plugin must use Composer and be registered with Packagist in order to be shared.
With the above-mentioned idea, it would probably be possible to just composer require
plugins into the Terminus directory itself. Would be worth trying, anyway.
With the above-mentioned idea, it would probably be possible to just composer require plugins into the Terminus directory itself. Would be worth trying, anyway.
The installer currently creates the file ~/terminus/composer.json
{
"require": {
"pantheon-systems/terminus": "^1.4"
}
}
I think the most straightforward way to manage additional plugins is to simply add them to the require
list in this file.
See https://github.com/consolidation/Robo/pull/604, implemented for Robo & BLT. This would work well with the ~/terminus/composer.json
file described above.
If that Robo PR is merged, Terminus would just need to define a well-known namespace, e.g. TerminusPlugin\\
, and inject this value into the Runner() along with the Composer autoloader from the autoload file.
This would be really easy to implement, but does not meet the initial requirements for Terminus plugins, as mentioned above. I'm not sure if supporting two plugin mechanisms in Terminus would be desired.
Copying this report over from https://github.com/pantheon-systems/terminus-build-tools-plugin/issues/49: