From 75c5a52a8a0a25c08aadbacf6893d64f9ed1b125 Mon Sep 17 00:00:00 2001 From: John Martin Date: Tue, 28 Aug 2012 17:11:33 +0100 Subject: [PATCH] Changed usage of fs.watch to nodewatch (npm install nodewatch) as it's a more reliable API than fs.watch --- bin/less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/less b/bin/less index cdaeb5aafb2..452dcc81e15 100755 --- a/bin/less +++ b/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', @@ -39,5 +39,5 @@ if (lastArg === '-p' || lastArg === '--production') { } console.log('Watching %s', watch); -fs.watch(watch, compile); +nodeWatch.add(watch).onChange(compile); compile();