Pretty print JSON for contract addresses

This makes it easier to read the file and a git diff is more useful
This commit is contained in:
bumi 2019-03-27 21:58:19 +01:00
parent 258c6729b6
commit b6f34ac9a5

View File

@ -4,5 +4,5 @@ const fs = require('fs');
module.exports = function (file, networkId, data) { module.exports = function (file, networkId, data) {
let content = JSON.parse(fs.readFileSync(file)); let content = JSON.parse(fs.readFileSync(file));
content[networkId] = data; content[networkId] = data;
fs.writeFileSync(file, JSON.stringify(content)); fs.writeFileSync(file, JSON.stringify(content, null, 2));
} }