applyLocal
Switches every ShadowJS dependency of a project to its tarball.
Switches every ShadowJS dependency of a project to its tarball.
Import#
ts
import { applyLocal } from "create-shadow-app";
Signature#
ts
function applyLocal(
sections: DependencySections,
manifest: LocalManifest,
from?: string,
): LocalResult
Parameters#
| Name | Description |
|---|---|
sections |
The project's dependencies with registry ranges. |
manifest |
What pack:local wrote. |
from |
Absolute directory of the project (for relative specifiers). |
Returns#
New sections, the overrides to add and what changed.
Throws#
- Error naming each ShadowJS package the project needs that was not packed, with the command that packs it.
Examples#
ts
applyLocal({ dependencies: { "@shadow-js/core": "^1.0.0" }, devDependencies: {} }, manifest);