Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Commit

Permalink
Using JSON.stringify now instead of util.inspect to write package.jso…
Browse files Browse the repository at this point in the history
…n files
  • Loading branch information
davglass committed Feb 21, 2011
1 parent 542feff commit bf2e5dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/merge_package_json.js
Expand Up @@ -36,7 +36,10 @@ for (var i in other) {
main[i] = other[i]; main[i] = other[i];
} }


var outData = sys.inspect(main, false, Infinity); //var outData = sys.inspect(main, false, Infinity);
var outData = JSON.stringify(main);

outData = outData.replace(/,/g, ',\n\t').replace(/{/g, '{\n').replace(/\[/g, '[\n');


if (exists('./build/' + pack)) { if (exists('./build/' + pack)) {
fs.writeFileSync(path.join('./build/', pack, 'package.json'), outData); fs.writeFileSync(path.join('./build/', pack, 'package.json'), outData);
Expand Down

0 comments on commit bf2e5dd

Please sign in to comment.