Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t-ski/watch-build
Generic file watch interface for custom incremental builds.
https://github.com/t-ski/watch-build
file portable watch
Last synced: about 10 hours ago
JSON representation
Generic file watch interface for custom incremental builds.
- Host: GitHub
- URL: https://github.com/t-ski/watch-build
- Owner: t-ski
- License: mit
- Created: 2024-06-17T09:48:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-17T23:37:31.000Z (5 months ago)
- Last Synced: 2024-06-18T20:18:24.248Z (5 months ago)
- Topics: file, portable, watch
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Watch Build
Generic file watch interface for custom incremental builds.
``` cli
npm i t-ski/watch-build
```### API
``` js
const { Watch } = require("@t-ski/watch-build");new Watch("./test/", {
filenamePattern: /.*/i,
interval: 1000,
once: false
})
.on("build", (paths) => {
// TODO: Handle changed files passed as argument
}
```### CLI
``` cli
npx watch [--|- *?]*
```| | |
| -: | :- |
| **Positional** | **Description** |
| `` `0` | Path to watch file target directory. |
| `` `1`
| Path to build module with a default function export:
`module.exports = (paths) => {}` |
| **Flag**| **Description** |
| `--once` `-O` | Build once, i.e. without future file change watch. |
| **Option** | **Description** |
| `--interval` `-I` | Time between watch iterations in ms (default: 1000). |
| `--pattern` `-P` | Filename pattern filter (string) regex (default: ".*"). |##
© Thassilo Martin Schiepanski