@everymundo/global-root-dir
v1.1.1
Published
Sets a global variable variable __rootdir
Downloads
16
Maintainers
Keywords
Readme
@everymundo/global-root-dir
Sets a global variable variable __rootdir
Install
npm install @everymundo/global-root-dir
Usage
// this will use process.pwd() as value
require('@everymundo/global-root-dir').setGlobalRootDir()
console.log(global.__rootdir);
console.log({__rootdir});
// if you prefer you can pass a directory
require('@everymundo/global-root-dir').setGlobalRootDir(__dirname)
console.log(global.__rootdir);
console.log({__rootdir});