Skip to content

Commit

Permalink
Changed usage of fs.watch to nodewatch (npm install nodewatch) as it'…
Browse files Browse the repository at this point in the history
…s a more reliable API than fs.watch
  • Loading branch information
johnmartin committed Aug 28, 2012
1 parent 3f532a2 commit 75c5a52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/less
@@ -1,7 +1,7 @@
#!/usr/bin/env node

var fs = require('fs'),
path = require('path'),
var path = require('path'),
nodeWatch = require('nodewatch'),
exec = require('child_process').exec,
watch = path.join(__dirname, '..', 'ckan', 'public', 'base', 'less'),
debug = process.env.ENV !== 'production',
Expand Down Expand Up @@ -39,5 +39,5 @@ if (lastArg === '-p' || lastArg === '--production') {
}

console.log('Watching %s', watch);
fs.watch(watch, compile);
nodeWatch.add(watch).onChange(compile);
compile();

0 comments on commit 75c5a52

Please sign in to comment.