function startWatchingSourceFiles()

in npm/cli/index.js [134:148]


function startWatchingSourceFiles() {
    if(!watchingFiles) {
        watchingFiles = true;
        //Watch the SOURCE_DIR_NAME directory, recompile if anything changes
        var pathToWatch = path.join(process.cwd(), SOURCE_DIR_NAME);
        console.log('Watching the directory %s for changes...', pathToWatch);
        watcher = chokidar.watch(pathToWatch)
        .on('change',
            function(path){
                console.log('Change detected... %s', path);
                compileDebug();
            }
        );
    }
}