From 7cec688d3742b6a02d3f72900b9dae988214aef2 Mon Sep 17 00:00:00 2001 From: Lukas Kleinschmidt Date: Mon, 2 Sep 2019 15:33:25 +0200 Subject: [PATCH] Cleanup --- README.md | 36 +++++++++++++++++++++++++++++++----- composer.json | 4 ++-- composer.lock | 2 +- index.php | 2 +- 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ca35642..c2712d4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,25 @@ -# WIP: Kirby Terminal +# Kirby Terminal +Manage background processes from the panel. Define scripts like you might already be familiar with from `npm`. Start or stop predefined scripts and monitor the output directly in the panel. -### Scripts -You can define almost any scripts you would normally run from a terminal. A script can be defined as a simple string or if you need more control you can define your script as a callback. The callback is expected to return either a `string` or a `Script` object. The closure of the callback is bound to the scripts section model. +![Terminal Preview](http://github.kleinschmidt.at/kirby-terminal/preview.gif) + +## Installation + +### Download +Download and copy this repository to `/site/plugins/terminal`. + +### Git submodule +``` +git submodule add https://github.com/lukaskleinschmidt/kirby-terminal.git site/plugins/terminal +``` + +### Composer +``` +composer require lukaskleinschmidt/kirby-terminal +``` + +## Define Scripts +You are able to run almost any scripts or commands you would normally run from a terminal. A script can be defined as a simple string or if you need more control you can define your script as a callback. The callback is expected to return either a `string` or a `Script` object. The closure of the callback is bound to the scripts section model. ```php script(), $this->model()); - if ($this->gate !== true) { + if ($this->gate() !== true) { throw new PermissionException; }