Related testing/Links
return lit.location
const {join, dirname, relative, resolve, normalize} = lit.utils.path
const {src,base,root} = lit.location
const full = join(base, root, src)
const ghConfig = {
prefix: '..'
}
// for a regular GitHub pages repo root
// will be calculated as the a sub path
// of the domain root
const ghRoot = '/pages-repo'
const gh = join(ghRoot, ghConfig.prefix, src)
// resolving links relative to file and root
const test = {
src: '/my/nested/file.lit',
root: '/not-at-root',
link: '../another/file.lit',
}
const link = join(test.root, dirname(test.src), test.link)
const linkCanonical = resolve(dirname(test.src), test.link)
// resolving relative path between 2 canonical srcs
const rel = relative(dirname(src), test.src)
// revolving cell sources to gh path
const sourceGH = relative(dirname('/meta/test.lit'), '../../escape.json')
return {full, gh, link, linkCanonical, rel, sourceGH}