[]previous and next page

fileSpec

The file: specifier of a tarball: relative to from when it is near, absolute otherwise (a path that climbs three levels is harder to read than the absolute one).

The file: specifier of a tarball: relative to from when it is near, absolute otherwise (a path that climbs three levels is harder to read than the absolute one).

Import#

ts
import { fileSpec } from "create-shadow-app";

Signature#

ts
function fileSpec(tarball: string, from?: string): string

Parameters#

Name Description
tarball Path of the tarball.
from Absolute directory of the project, if known.

Returns#

For example file:../.pack/shadow-js-core-1.0.0.tgz.

Examples#

ts
fileSpec("/work/.pack/shadow-js-core-1.0.0.tgz", "/work/app"); // "file:../.pack/shadow-js-core-1.0.0.tgz"