Created
May 6, 2012 10:43
-
-
Save tiye/2621576 to your computer and use it in GitHub Desktop.
the output of fs.watchFile when I save a .coffee file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{spawn} = require 'child_process' | |
{print} = require 'util' | |
fs = require 'fs' | |
coffee_file = 'convert.coffee' | |
coffee_eval = 'run/eval.coffee' | |
jade_file = 'html.jade' | |
stylus_file = 'page.styl' | |
fs.watchFile coffee_file, (e) -> | |
result = spawn 'coffee', ['-bc', coffee_file] | |
msg = '' | |
result.stderr.on 'data', (str) -> | |
msg+= str | |
result.stderr.on 'end', -> | |
console.log 'msg: ', msg | |
print "!! #{coffee_file}\n" | |
fs.watchFile coffee_eval, (e) -> | |
result = spawn 'coffee', ['-bc', coffee_eval] | |
msg = '' | |
result.stderr.on 'data', (str) -> | |
msg+= str | |
result.stderr.on 'end', -> | |
console.log 'msg: ', msg | |
print "!! #{coffee_eval}\n" | |
fs.watchFile jade_file, -> | |
spawn 'jade', [jade_file] | |
print "!! #{jade_file}\n" | |
fs.watchFile stylus_file, -> | |
spawn 'stylus', [stylus_file] | |
print "!! #{stylus_file}\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ coffee compile.coffee | |
{ dev: 2053, | |
ino: 5767525, | |
mode: 33204, | |
nlink: 1, | |
uid: 1000, | |
gid: 1000, | |
rdev: 0, | |
size: 0, | |
blksize: 4096, | |
blocks: 0, | |
atime: Sun, 06 May 2012 08:20:14 GMT, | |
mtime: Sun, 06 May 2012 10:41:41 GMT, | |
ctime: Sun, 06 May 2012 10:41:41 GMT } | |
!! convert.coffee | |
{ dev: 2053, | |
ino: 5767525, | |
mode: 33204, | |
nlink: 1, | |
uid: 1000, | |
gid: 1000, | |
rdev: 0, | |
size: 12657, | |
blksize: 4096, | |
blocks: 32, | |
atime: Sun, 06 May 2012 08:20:14 GMT, | |
mtime: Sun, 06 May 2012 10:41:41 GMT, | |
ctime: Sun, 06 May 2012 10:41:41 GMT } | |
!! convert.coffee | |
msg: | |
msg: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment