JSPM

relative-dest

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 890
  • Score
    100M100P100Q101942F
  • License

Calculate the relative path from a file's destination path to another directory or file.

Package Exports

  • relative-dest

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (relative-dest) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

relative-dest NPM version

Calculate the relative path from a file's destination path to another directory or file.

Install with npm

npm i relative-dest --save

Usage

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/');
//=> '.'

API

Run tests

Install dev dependencies:

node i -d && mocha

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert
Released under the MIT license


This file was generated by verb on December 20, 2014.