1
0
Fork 0
mirror of https://github.com/archtechx/airwire.git synced 2025-12-12 02:34:04 +00:00

write readme

This commit is contained in:
Samuel Štancl 2021-05-20 22:38:02 +02:00
parent d26fa93f1e
commit 28e16d6bef
7 changed files with 619 additions and 5 deletions

View file

@ -1,14 +1,14 @@
const chokidar = require('chokidar');
const exec = require('child_process').exec;
class AirwireWatcher {
constructor(files = 'app/**/*.php') {
constructor(chodikar, files = 'app/**/*.php') {
this.chodikar = chodikar;
this.files = files;
}
apply(compiler) {
compiler.hooks.afterEnvironment.tap('AirwireWatcher', () => {
chokidar
this.chodikar
.watch(this.files, { usePolling: false, persistent: true })
.on('change', this.fire);
});