Writes atomically and creates directories for you as needed. Sorts dependencies when writing. Preserves the indentation if the file already exists.
$ npm install write-pkg
const path = ;const writePkg = ;;;;
Path to where the
package.json file should be written or its directory.
MIT © Sindre Sorhus