Get relative path, based on current path.
This module could solve problems of how many ../
should I use.
npm install relative.to --save
or
yarn add relative.to
const relativeTo = require('relative.to');
const path = relativeTo('/root/a', '/root/b'); // b
- currentFile: {String} currentFile path
- distFile: {String} target file that need to be calculated