2016-04-15 22:43:05 +00:00
|
|
|
#!/bin/env coffee
|
2016-04-15 22:06:16 +00:00
|
|
|
|
|
|
|
fs = require 'fs'
|
|
|
|
Inotify = require('inotify').Inotify
|
|
|
|
spawn = require('child_process').spawn
|
|
|
|
|
|
|
|
spew = (data) -> console.log data.toString 'utf8'
|
|
|
|
|
|
|
|
server = spawn './node_modules/http-server/bin/http-server', ['./htdocs/']
|
|
|
|
server.stdout.on 'data', spew
|
|
|
|
|
|
|
|
monitor = new Inotify()
|
|
|
|
|
|
|
|
reBuild = ->
|
|
|
|
maker = spawn 'make', ['store']
|
2016-04-15 22:43:05 +00:00
|
|
|
maker.stdout.on 'data', spew
|
2016-04-15 22:06:16 +00:00
|
|
|
|
|
|
|
monitor.addWatch
|
|
|
|
path: "./src/backbonestore.nw"
|
|
|
|
watch_for: Inotify.IN_CLOSE_WRITE
|
|
|
|
callback: reBuild
|