php-spark/plugins/com.noccy.watcher/README.md

38 lines
736 B
Markdown
Raw Normal View History

# Watcher Plugin for Spark
Note: While the plugin currently supports wildcards, it does not scale well.
Keep the watched files to a minimum or increase the interval if you experience
issues.
## Usage
$ spark watch
## Installation
1. Install Spark with global plugins
2. Initialize your project: `spark init`
3. Enable the plugin with `spark plugin --enable com.noccy.watcher`
4. Configure your `.spark/watchers.json` file
## Configuration
*watchers.json*
```json
{
"watchers": [
{
"name": "name-of-rule",
"watch": [ "file1", "dir1/*" ],
"initial-trigger": true,
"actions": [
"@build"
]
}
]
}
```
The `initial-trigger` key controls whether the rule is triggered on startup.