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): voidParameters:
| 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: