code: function getRelativePath (from, to) {
    // 去除相同部分
    var i = 0
    while (from[i] === to[i]) {
      i++
    }
    from = from.substr(i)
    to = to.substr(i)
    // 加上..或.
    var l = from.split(/\/|\\/).length - 1
    var s = ''
    if (l) {
      while (l--) {
        s += '../'
      }
    } else {
      s = './'
    }
    return s + to
  }
docs: nodejs的require('path').relative有bug，因此自己写