Calculate the relative path from a file's destination path to another directory or file.
Install with npm
npm i relative-dest --save
var relative = require('relative-dest');
relative('dist/a/b/c.md', 'dist/public');
//=> '../../public'
relative('dist/a/b/c.md', 'assets');
//=> '../../../assets'
relative('a.md', 'dist/public/css');
//=> 'dist/public/css'
relative('a/b/c/', 'a/b/c/');
//=> '.'
Install dev dependencies:
node i -d && mocha
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert
Released under the MIT license
This file was generated by verb on December 20, 2014.