path.js
function relativePath(from, to) {
  // console.log('relativePath:from: ' + from);
  // console.log('relativePath:to: ' + to);
  var relative = path.relative(from, to);
  if (!relative || relative.length < 1) {
    return relative;
  }
  var first = relative.substr(0, 1);
  if (first !== '.' && first !== '/') {
    relative = './' + relative;
  }

  // especially used for windows
  relative = relative.split(path.sep).join('/');

  return relative;
}
function relativePath(from, to) {
  // console.log('relativePath:from: ' + from);
  // console.log('relativePath:to: ' + to);
  var relative = path.relative(from, to);
  if (!relative || relative.length < 1) {
    return relative;
  }
  var first = relative.substr(0, 1);
  if (first !== '.' && first !== '/') {
    relative = './' + relative;
  }

  // especially used for windows
  relative = relative.split(path.sep).join('/');

  return relative;
}
function relativePath ( from , to ) { // console.log('relativePath:from: ' + from); // console.log('relativePath:to: ' + to); var relative = path . relative ( from , to ) ; if ( ! relative || relative . length < 1 ) { return relative ; } var first = relative . substr ( 0 , 1 ) ; if ( first !== '.' && first !== '/' ) { relative = './' + relative ; } // especially used for windows relative = relative . split ( path . sep ) . join ( '/' ) ; return relative ; }
get relative path

@param from
@param to
@returns {*}
get relative path