Skip to content

Commit c605d6e

Browse files
committed
New docs
1 parent d6227fb commit c605d6e

File tree

2 files changed

+27
-81
lines changed

2 files changed

+27
-81
lines changed

.docs/README.md

Lines changed: 18 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,39 @@
1-
# Apitte\Console
1+
# Apitte Console
22

3-
## Content
3+
Console commands for [Apitte](https://github.com/apitte/core).
44

5-
- [Installation - how to register a plugin](#installation)
6-
- [Configuration - all options](#configuration)
7-
- [Usage - controller showtime](#usage)
5+
## Setup
86

9-
## Installation
7+
First of all, setup [core](https://github.com/apitte/core) package.
108

11-
This plugin requires [Apitte/Core](https://github.com/apitte/core) library.
9+
Install and register console plugin
1210

13-
At first you have to register the main extension.
14-
15-
```yaml
16-
extensions:
17-
api: Apitte\Core\DI\ApiExtension
11+
```bash
12+
composer require apitte/console
1813
```
1914

20-
Secondly, add the `ConsolePlugin` plugin.
21-
2215
```yaml
2316
api:
2417
plugins:
2518
Apitte\Console\DI\ConsolePlugin:
2619
```
2720
28-
## Configuration
29-
30-
```yaml
31-
api:
32-
plugins:
33-
Apitte\Console\DI\ConsolePlugin:
34-
35-
services:
36-
- Apitte\Console\Command\RouteDumpCommand
37-
```
38-
39-
## Usage
40-
41-
To execute prepared commands you will need Symfony Console Application. Don't waste your time to implement it
42-
and use [prepared solution](#console) from Contributte/Console.
43-
44-
With Contributte/Console you could call `bin/console` and see the magic.
45-
46-
```
47-
php bin/console apitte:<>
48-
```
49-
50-
| Command | Description |
51-
|---------|-------------|
52-
| apitte:route:dump | List all endpoints and their details |
53-
54-
## Console
21+
You also need setup an integration of [symfony/console](https://symfony.com/doc/current/components/console.html), try [contributte/console](https://github.com/contributte/console/)
5522
56-
Take a look at [Contributte/Console](https://github.com/contributte/console).
23+
If you use [kdyby/console](https://github.com/Kdyby/Console) then make sure you add required tag to registered commands.
5724
58-
Install it via composer.
59-
60-
```
61-
composer require contributte/console
62-
```
63-
64-
And setup your NEON.
65-
66-
```
67-
extensions:
68-
console: Contributte\Console\DI\ConsoleExtension
25+
```yaml
26+
decorator:
27+
Symfony\Component\Console\Command\Command:
28+
tags: [kdyby.console.command]
6929
```
7030
71-
At least create `<project>/bin/console` and make it executable.
72-
73-
```
74-
#!/usr/bin/env php
75-
<?php
31+
## Commands
7632
77-
/** @var Nette\DI\Container $container */
78-
$container = require __DIR__ . '/../app/bootstrap.php';
33+
### Route dump
7934
80-
// Get application from DI container.
81-
$application = $container->getByType(Contributte\Console\Application::class);
35+
List all endpoints and their details
8236
83-
// Run application.
84-
exit($application->run());
37+
```bash
38+
php bin/console apitte:route:dump
8539
```

README.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Apitte\Console
1+
# Apitte Console
22

3-
:pill: Console for Apitte [`Nette Framework`](https://github.com/nette/).
4-
5-
-----
3+
Console commands for [Apitte](https://github.com/apitte/core).
64

75
[![Build Status](https://img.shields.io/travis/apitte/console.svg?style=flat-square)](https://travis-ci.org/apitte/console)
86
[![Code coverage](https://img.shields.io/coveralls/apitte/console.svg?style=flat-square)](https://coveralls.io/r/apitte/console)
@@ -16,12 +14,6 @@
1614

1715
[![Join the chat](https://img.shields.io/gitter/room/apitte/apitte.svg?style=flat-square)](http://bit.ly/apittegitter)
1816

19-
## Install
20-
21-
```
22-
composer require apitte/console
23-
```
24-
2517
## Version
2618

2719
| State | Version | Branch | PHP | Composer |
@@ -30,14 +22,10 @@ composer require apitte/console
3022
| stable | `^0.4.0` | `master` | `>= 7.1` | |
3123
| stable | `^0.3.0` | `master` | `>= 5.6` | |
3224

33-
---
34-
35-
3625
## Documentation
3726

38-
- [Installation - how to register a plugin](https://github.com/apitte/console/tree/master/.docs#installation)
39-
- [Configuration - all options](https://github.com/apitte/console/tree/master/.docs#configuration)
40-
- [Usage - controller showtime](https://github.com/apitte/console/tree/master/.docs#usage)
27+
- [Setup](.docs/README.md#setup)
28+
- [Commands](.docs/README.md#commands)
4129

4230
## Maintainers
4331

@@ -62,4 +50,8 @@ composer require apitte/console
6250
</tbody>
6351
</table>
6452

65-
Thank you for testing, reporting and contributing.
53+
## Sponsoring
54+
55+
<a href="https://github.com/tlapnet"><img width="200" src="https://cdn.rawgit.com/f3l1x/xsource/2463efb7/assets/tlapdev.png"></a>
56+
57+
The development is sponsored by [Tlapnet](https://www.tlapnet.cz)

0 commit comments

Comments
 (0)