PackageJson
Defined in: packageJson.ts:33
Reads, mutates, and writes back a project’s package.json, ordering key maps on write.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PackageJson(
packageRoot?):PackageJson
Defined in: packageJson.ts:41
Parameters
Section titled “Parameters”packageRoot?
Section titled “packageRoot?”string
Returns
Section titled “Returns”PackageJson
Methods
Section titled “Methods”get<
T>(name,defaultValue):T
Defined in: packageJson.ts:90
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”string
defaultValue
Section titled “defaultValue”T
Returns
Section titled “Returns”T
stringify()
Section titled “stringify()”stringify():
string
Defined in: packageJson.ts:64
Returns
Section titled “Returns”string
write()
Section titled “write()”write():
void
Defined in: packageJson.ts:77
Returns
Section titled “Returns”void
Properties
Section titled “Properties”actions
Section titled “actions”actions:
string[]
Defined in: packageJson.ts:34
contents
Section titled “contents”contents:
PackageJsonContents
Defined in: packageJson.ts:35
name:
string
Defined in: packageJson.ts:36
originalContents
Section titled “originalContents”originalContents:
string
Defined in: packageJson.ts:37
path:
string
Defined in: packageJson.ts:38
pjsonPath
Section titled “pjsonPath”pjsonPath:
string
Defined in: packageJson.ts:39