Disponible
amalgame-io-filewatcher
mtime polling cross-OS.
Vue d'ensemble
Surveillance d'arborescences pour les outils de dev (hot-reload, livereload, watch tests). Pas d'inotify/FSEvents — pollage mtime simple mais ultra-portable. Pile de Mosaic dev mode.
Caractéristiques
- ✓Surveillance récursive ou non
- ✓Filtres glob (
**/*.am,!node_modules/**) - ✓Callback unifié
OnChange(path, kind)(add / modify / delete) - ✓Polling configurable (250 ms par défaut)
- ✓Cross-OS — pas de dépendance système exotique
Exemple
Exemple minimal d'utilisation — recopiable tel quel après l'install.
amc package add io-filewatcher
let fw = FileWatcher.New("./src", recursive: true)
fw.OnChange(fn(path, kind) {
Console.WriteLine(kind + " " + path)
rebuild()
})
fw.Start()
En bref
- Licence : Apache-2.0
- Installation :
amc package add io-filewatcher - Code source : amalgame-lang/amalgame-io-filewatcher
- Index officiel : amalgame-lang/packages-index