Comparing version
25
catn8.js
@@ -11,6 +11,8 @@ var pkg = require( './lib/packages' ), | ||
watching_config = {}, | ||
watching_dir = {}; | ||
watching_dir = {}, | ||
nowatch = false; | ||
function catn8( path ) { | ||
pwd = pkg.path.resolve( process.cwd(), path ); | ||
function catn8( path, nw ) { | ||
pwd = pkg.path.resolve( process.cwd(), path ); | ||
nowatch = nw === '--nowatch'; | ||
@@ -39,3 +41,3 @@ var walkies = walker.start( pwd, onfindconfig ); | ||
console.log( 'dir change: ', arguments ); | ||
catn8( dir_path ); | ||
catn8( dir_path, nowatch ); | ||
} | ||
@@ -52,8 +54,10 @@ | ||
console.log( 'found configuration and listening to: ', conf.__meta__.pwd ); | ||
if ( nowatch !== true ) { | ||
console.log( 'found configuration and listening to: ', conf.__meta__.pwd ); | ||
conf.__meta__.watcher = | ||
watching_config[config_path] = | ||
watching_dir[conf.__meta__.pwd] = | ||
watching_dir[conf.source.dir] = watcher.start( conf.source.dir, onchange, conf ); | ||
conf.__meta__.watcher = | ||
watching_config[config_path] = | ||
watching_dir[conf.__meta__.pwd] = | ||
watching_dir[conf.source.dir] = watcher.start( conf.source.dir, onchange, conf ); | ||
} | ||
@@ -67,3 +71,4 @@ file.create( conf ); | ||
watching_dir[dir_path] = watcher.start( dir_path, ondirchange, dir_path ); | ||
if ( nowatch !== true ) | ||
watching_dir[dir_path] = watcher.start( dir_path, ondirchange, dir_path ); | ||
} | ||
@@ -70,0 +75,0 @@ |
@@ -37,3 +37,3 @@ { | ||
}, | ||
"version" : "0.0.5" | ||
"version" : "0.0.6" | ||
} |
Sorry, the diff of this file is not supported yet
14626
-11.97%16
-65.22%267
-14.7%