Updated readme

This commit is contained in:
Chris 2021-12-09 00:23:05 +01:00
parent d940a94611
commit a0d68a606c

View File

@ -5,11 +5,43 @@ database migrations and project deployment.
## Installation
Download `spark.phar` and make it executable. If desired, alias `spark=spark.phar`.
You may also want to alias `sparksh='spark repl'`.
~~Download `spark.phar` and make it executable. If desired, alias `spark=spark.phar`.~~
~~You may also want to alias `sparksh='spark repl'`.~~
Download the latest release from [dev.noccylabs.info](https://dev.noccylabs.info/noccy/php-spark/releases)
and extract it into a directory somewhere, such as `/tmp`:
```
$ mkdir /tmp/spark; cd /tmp/spark; unzip ~/Downloads/spark-0.1.0-dist.zip`
```
Make sure spark.phar is executable, and run the installer. Then just follow the
instructions:
```
$ chmod +x spark.phar
$ ./spark.phar install
```
Afterward you will be able to call directly on `spark`, as well as optionally
the `sparkplug`, `sparker`, `sparkres` and `sparksh` aliases. You can then
install any new plugins into `~/opt/spark/plugins` and enable them in your
projects with `sparkplug --enable the.plugin.name`.
## Using Spark
### The easy way
To get started use the `init` command. You still need to edit the `/.spark/docker.json`
and other related files as required, but his is the *easy* way.
```
$ spark init
$ sparkplug --enable com.noccy.git
```
### The useful details
Spark expects a configuration file to either be found at `./.spark.json` or
`./.spark/spark.json` relative to the project root. The `./.spark` directory
will always be used for auxillary configuration, so the placement is fully up