MCPcopy
hub / github.com/FredKSchott/snowpack / writeLockfile

Function writeLockfile

snowpack/src/util.ts:161–165  ·  view source on GitHub ↗
(loc: string, importMap: LockfileManifest)

Source from the content-addressed store, hash-verified

159}
160
161export async function writeLockfile(loc: string, importMap: LockfileManifest): Promise<void> {
162 importMap.dependencies = sortObject(importMap.dependencies);
163 importMap.lock = sortObject(importMap.lock);
164 fs.writeFileSync(loc, JSON.stringify(importMap, undefined, 2), {encoding: 'utf8'});
165}
166
167export function isTruthy<T>(item: T | false | null | undefined): item is T {
168 return Boolean(item);

Callers 2

addCommandFunction · 0.90
rmCommandFunction · 0.90

Calls 1

sortObjectFunction · 0.85

Tested by

no test coverage detected