0.1v: basic features
added lexer, parser, Shell, Executor. added tests for sonyalib it already works! will be implementing more features soon.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# sonya
|
||||
|
||||
A lightweight `just`-like task runner written in Swift.
|
||||
|
||||
Define recipes in a `sonyafile` and run them with `sonya <recipe>`.
|
||||
|
||||
## sonyafile syntax
|
||||
|
||||
```
|
||||
CC = clang
|
||||
FLAGS = -O2
|
||||
|
||||
build:
|
||||
$(CC) $(FLAGS) main.c -o main
|
||||
|
||||
run: build
|
||||
./main
|
||||
|
||||
clean:
|
||||
rm -f main
|
||||
```
|
||||
|
||||
- Variables are defined as `key = value` and referenced as `$(key)`
|
||||
- Recipes can declare dependencies after the colon - they run first
|
||||
- Commands are indented with whitespace
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
swift build -c release
|
||||
cp .build/release/sonya /usr/local/bin/sonya
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```sh
|
||||
sonya build # run a specific recipe
|
||||
sonya # runs "default" recipe
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
|
||||
- Command-line argument passing to recipes (`$1`, `$2`, ...)
|
||||
Reference in New Issue
Block a user