scaffold
Creates the folder structure and starter files for a new alert.
Usage
orwell scaffold [options]Options
| Flag | Alias | Default | Description |
|---|---|---|---|
--name <name> | -n | (required) | Alert name |
--group-name <group> | -g | alert-group | Group folder name |
--base-dir <dir> | src | Base directory for alerts | |
--dest <dir> | . | Destination directory | |
--no-git | Skip git init |
What it creates
<dest>/ <base-dir>/ <group-name>/ <name>/ watcher.non-prod.json ← starter watcher definition script.groovy ← references shared script shared/ shared.groovy ← shared Painless codescript.groovy comes pre-wired with an #include pointing at shared/shared.groovy:
#include "../../shared/shared.groovy"
// your Painless logic hereExamples
Default group name
orwell scaffold --name order-failureCreates src/alert-group/order-failure/.
Custom group
orwell scaffold --name order-failure --group-name paymentsCreates src/payments/order-failure/.
Different base directory and destination
orwell scaffold --name order-failure -g payments --base-dir alerts --dest /tmp/my-projectSkip git init
Useful when adding an alert to an existing repository:
orwell scaffold --name order-failure --no-git