1 |
|
2 |
|
3 | /**
|
4 | * Watch files.
|
5 | */
|
6 |
|
7 | ;
|
8 |
|
9 | process.chdir(__dirname + '/..');
|
10 |
|
11 | const apeWatching = require('ape-watching'),
|
12 | childProcess = require('child_process');
|
13 |
|
14 | let timer = null;
|
15 | apeWatching.watchFiles([
|
16 | 'lib/**/*.jsx'
|
17 | ], (ev, filename) => {
|
18 | clearTimeout(timer);
|
19 | timer = setTimeout(function () {
|
20 | childProcess.fork('ci/compile.js');
|
21 | }, 300);
|
22 | }); |
\ | No newline at end of file |