UNPKG

394 BJavaScriptView Raw
1#!/usr/bin/env node
2
3/**
4 * Watch files.
5 */
6
7"use strict";
8
9process.chdir(__dirname + '/..');
10
11const apeWatching = require('ape-watching'),
12 childProcess = require('child_process');
13
14let timer = null;
15apeWatching.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