Skip to content

Add console extend plugin example #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# deprecation-detector
/.rules

# Composer
/vendor

# Binaries
/box.phar
/console.phar
/composer.phar
/drupal.phar
/drupal.phar.version

# Test
/phpunit.xml

# Project
extend.config.yml
extend.services.yml
extend.console.config.yml
extend.console.services.yml
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Drupal Console extend
# Drupal Console Extend

Instructions to extend Drupal Console adding commands globally.
Composer template and instructions to extend Drupal Console adding commands globally.

### Create `~/.console/` directory
Execute the `init` command and select `/Users/USER_NAME/.console/` when asked for destination.
```
drupal init
```
NOTES:
* For instructions about installing the [Drupal Console Launcher](https://github.com/hechoendrupal/DrupalConsole/#update-drupalconsole-launcher)
NOTES: For instructions about installing the [Drupal Console Launcher](https://github.com/hechoendrupal/DrupalConsole/#update-drupalconsole-launcher).

### Install this project:
```
Expand Down
22 changes: 4 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drupal/console-extend",
"description": "Drupal Console Extend",
"description": "Drupal Console Extend Template",
"license": "GPL-2.0+",
"authors": [
{
Expand All @@ -9,23 +9,9 @@
}
],
"require": {
"symfony/yaml": ">=2.7 <3.0",
"symfony/finder": ">=2.7 <3.0"
"drupal/console-extend-plugin":"dev-master",
"drupal/console-extend-example": "dev-master"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {"Drupal\\Console\\Extend\\": "src"}
},
"require-dev": {
"composer/installers": "^1.2"
},
"scripts": {
"post-install-cmd": [
"Drupal\\Console\\Extend\\Plugin\\ScriptHandler::dump"
],
"post-update-cmd": [
"Drupal\\Console\\Extend\\Plugin\\ScriptHandler::dump"
]
}
"prefer-stable": true
}
224 changes: 0 additions & 224 deletions composer.lock

This file was deleted.

9 changes: 0 additions & 9 deletions console.config.yml

This file was deleted.

10 changes: 5 additions & 5 deletions console.services.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#services:
# console.extend_example:
# class: \Drupal\Console\Extend\Command\ExampleCommand
# tags:
# - { name: drupal.command }
services:
console.extend_global:
class: \Drupal\Console\Extend\Command\GlobalCommand
tags:
- { name: drupal.command }
2 changes: 1 addition & 1 deletion phpqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ application:
enabled: false
exception: false
phpunit:
enabled: false
enabled: true
exception: true
file:
configuration: phpunit.xml.dist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @file
* Contains \Drupal\Console\Extend\Command\ExampleCommand
* Contains \Drupal\Console\Extend\Command\GlobalCommand
*/

namespace Drupal\Console\Extend\Command;
Expand All @@ -18,7 +18,7 @@
*
* @package Drupal\Console\Extend\Command
*/
class ExampleCommand extends Command
class GlobalCommand extends Command
{
use CommandTrait;
/**
Expand All @@ -35,7 +35,7 @@ public function __construct()

protected function configure()
{
$this->setName('extend:example')
$this->setName('extend:global')
->setDescription('Drupal Console global example ');
}

Expand Down
Loading