Skip to content

editPackageJsonSync

Reads, edits, and writes back the package.json file using the provided edit function.

Import:

import { editPackageJsonSync } from '@mnaoumov/typescript-dev-toolkit/npm';

Signature:

function editPackageJsonSync(editFunction: (packageJson: PackageJson) => void, options: EditPackageJsonOptions): void

Parameters:

Parameter Type Description
editFunction (packageJson: PackageJson) => void The function to edit the parsed PackageJson object.
options EditPackageJsonOptions Additional options for editing.

Returns: void


Links to this page: