1.1.1 • Published 5 years ago

@everymundo/global-root-dir v1.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

@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});