https://github.com/bannzai/teapot
https://github.com/bannzai/teapot
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bannzai/teapot
- Owner: bannzai
- License: mit
- Created: 2019-04-05T00:48:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-07T13:38:56.000Z (almost 7 years ago)
- Last Synced: 2025-04-06T05:00:03.915Z (about 1 year ago)
- Language: Swift
- Size: 104 KB
- Stars: 31
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://developer.apple.com/swift)
[](https://img.shields.io/badge/platform-macOS-green.svg)
[](https://github.com/bannzai/Teapot/blob/master/LICENSE)
## Teapot
Teapot is command line tool writen by Swift.
It can be execute your shell command for each file, when file modified.
## Required
Swift 5.0 or later.
And it require to run on macOS.
## Install
Using mint.
```shell
$ mint install bannzai/Teapot
```
## Usage
First, Teapot necessary configuration file named `teapot.yml`.
Teapot can prepare `teapot.yml` to under the current directory via `$ teapot setup`.
```swift
$ teapot setup
🍵 Teapot setup completion. You can edit ./teapot.yml 🍵
```
This will generate the following file:
```yaml
source:
- build/*
- Sources/*.*
- Sources/Teapot/*.*
ignore:
- ".git"
- ".gitignore"
- tests/*
execute:
- ls -la __FILE__
- echo $HOME
```
- `source` is target file of listen to changing.
- `ignore` is ignored target file of listen to changing.
- `execute` is exec shell command for changed target file.
- `__FILE__` is mark of changed file. So, It is replaced when file changed.
Next, Teapot can be execute your shell command for each file when file modified for it according to `teapot.yml` configuration.
```swift
$ teapot start
🍵 Teapot start 🍵
```
For example, when you edit some file, teapot display result of `$ ls -la` to changed file.
## LICENSE
[Teapot](https://github.com/bannzai/Teapot/) is released under the MIT license. See [LICENSE](https://github.com/bannzai/Teapot/blob/master/LICENSE.txt) for details.
Header logo is released [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/deed) license. Original design by [noainoue](https://github.com/noainoue).