Skip to content
Browse files

Add minifier

  • Loading branch information...
1 parent c52dfc1 commit 846c6ffbb6f4de2727dd674f75cbd4cf4292a68a @gjtorikian gjtorikian committed
Showing with 13 additions and 0 deletions.
  1. +13 −0 build/json_minifier.js
View
13 build/json_minifier.js
@@ -0,0 +1,13 @@
+var args = process.argv.slice(2),
+ fileIn = args[0],
+ fileOut = args[1],
+ fs = require("fs");
+
+ fs.readFile(fileIn, "utf8", function(err, json) {
+ if (err) {
+ console.error(err);
+ process.exit(1);
+ }
+
+ fs.writeFileSync(fileOut, JSON.stringify(JSON.parse(json), null));
+ });

0 comments on commit 846c6ff

Please sign in to comment.
Something went wrong with that request. Please try again.