lib/utils.js
function getFilePathRelativeToAppRoot (pPath) {
    // go to meow-blog directory
    var projectBaseDirectory = path.resolve(__dirname, '..');

    if (projectBaseDirectory.indexOf('node_modules') !== -1) {
        // from meow-blog, go up to node_modules, then go to base directory
        projectBaseDirectory = path.resolve(projectBaseDirectory, '..', '..');
    }

    return path.resolve(projectBaseDirectory, pPath);
}
function getFilePathRelativeToAppRoot (pPath) {
    // go to meow-blog directory
    var projectBaseDirectory = path.resolve(__dirname, '..');

    if (projectBaseDirectory.indexOf('node_modules') !== -1) {
        // from meow-blog, go up to node_modules, then go to base directory
        projectBaseDirectory = path.resolve(projectBaseDirectory, '..', '..');
    }

    return path.resolve(projectBaseDirectory, pPath);
}
function getFilePathRelativeToAppRoot ( pPath ) { // go to meow-blog directory var projectBaseDirectory = path . resolve ( __dirname , '..' ) ; if ( projectBaseDirectory . indexOf ( 'node_modules' ) !== - 1 ) { // from meow-blog, go up to node_modules, then go to base directory projectBaseDirectory = path . resolve ( projectBaseDirectory , '..' , '..' ) ; } return path . resolve ( projectBaseDirectory , pPath ) ; }
Get file path relative to app root
@param pPath
Get file path relative to app root