How to use the path function from app-root-path
Find comprehensive JavaScript app-root-path.path code examples handpicked from public code repositorys.
GitHub: KenEucker/clobfig
14 15 16 17 18 19 20 21 22 23
const calculatedAppRoot = !!require.main ? path.dirname(require.main.filename) : (!!process.mainModule ? path.dirname(process.mainModule.filename) : process.cwd()) /// Determine root configuration folder this._configFilePathRelative = opts.relativePath this._configFilePathAppRoot = fs.existsSync(calculatedAppRoot) ? calculatedAppRoot : appRoot.path /// include files that match this in their filename (including extension) this._configSelectors = opts.configSelectors || ['config.js'] this._dataSelectors = opts.dataSelectors || ['.json']
0
0
0
GitHub: hackoregon/jinn
16 17 18 19 20 21 22 23 24 25
} } catch (e) { log.warn('No package.json found at root of project', e) } const appRoot = appRootPath.path module.exports = appRoot
0
0
0
app-root-path.setPath is the most popular function in app-root-path (26 examples)