lib/start.js
function getRootPath(){
    var rootPath = path.resolve('.');
    while(rootPath){
        if(fs.existsSync(rootPath + '/config.json')){
            break;
        }
        rootPath = rootPath.substring(0, rootPath.lastIndexOf(path.sep));
    }
    return rootPath;
}
function getRootPath(){
    var rootPath = path.resolve('.');
    while(rootPath){
        if(fs.existsSync(rootPath + '/config.json')){
            break;
        }
        rootPath = rootPath.substring(0, rootPath.lastIndexOf(path.sep));
    }
    return rootPath;
}
function getRootPath ( ) { var rootPath = path . resolve ( '.' ) ; while ( rootPath ) { if ( fs . existsSync ( rootPath + '/config.json' ) ) { break ; } rootPath = rootPath . substring ( 0 , rootPath . lastIndexOf ( path . sep ) ) ; } return rootPath ; }
get test root
get test root