Writes an object to a JSON file. options
are the same that
you'd pass to jsonFile.writeFile()
.
Alias: writeJSON()
Sync: writeJsonSync()
, writeJSONSync()
var fs = require('fs-extra')
fs.writeJson('./package.json', {name: 'fs-extra'}, function (err) {
console.log(err)
})
See also: outputJson()