resolve/normalize a filepath using the cwd as the basepath if relative
$ npm install cli-path-resolve
If an argument is passed to your cli script that points to the file system, it can be absolute or relative.
If it's relative - this module will use the current working directory (process.cwd) as the basedir.
var args =var resolve =var filepath =// filepath is now normalized and absoluteconsole
If we have installed globalscript.js globally - we can run it from anywhere.
$ cd /home/myfolder $ globalscript.js --filepath imgs/balloons.jpg /home/myfolder/imgs/balloons.jpg
var resolved = resolve(path)
Will return path if it is absolute or will resolve it against process.cwd if its relative.