The file is written atomically and missing directories are created. An
existing file keeps its indentation and its trailing newline or lack of one.
Empty dependency objects are removed and dependencies are sorted
alphabetically.
Parameters
path: string
The path to the package.json file or its directory.
Writes a package.json file with
write-package.The file is written atomically and missing directories are created. An existing file keeps its indentation and its trailing newline or lack of one. Empty dependency objects are removed and dependencies are sorted alphabetically.