UNPKG

377 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')
12const childProcess = require('child_process')
13
14let timer = null
15
16apeWatching.watchFiles([
17 'lib/**/*.jsx'
18], (ev, filename) => {
19 clearTimeout(timer)
20 timer = setTimeout(function () {
21 childProcess.fork('ci/compile.js')
22 }, 300)
23})