Skip to content

Instantly share code, notes, and snippets.

@denysonique
Created May 27, 2012 23:49
Show Gist options
  • Save denysonique/2816433 to your computer and use it in GitHub Desktop.
Save denysonique/2816433 to your computer and use it in GitHub Desktop.
fs = require 'fs'
cp = require 'child_process'
fs.readdir './', (err, files)->
for file in files
if file.match /.*\.jade$/
console.log 'watching: ', file
fs.watchFile file, persistent: true, (current, prev)->
console.log 'compiling'
console.log "jade < #{file} > #{file}.html"
cp.exec "jade < #{file} > ../#{file}.html"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment