Skip to content
This repository
Browse code

Add minifier

  • Loading branch information...
commit 846c6ffbb6f4de2727dd674f75cbd4cf4292a68a 1 parent c52dfc1
Garen Torikian authored November 29, 2012

Showing 1 changed file with 13 additions and 0 deletions. Show diff stats Hide diff stats

  1. 13  build/json_minifier.js
13  build/json_minifier.js
... ...
@@ -0,0 +1,13 @@
  1
+var args = process.argv.slice(2),
  2
+    fileIn = args[0],
  3
+    fileOut = args[1],
  4
+    fs = require("fs");
  5
+
  6
+    fs.readFile(fileIn, "utf8", function(err, json) {
  7
+        if (err) {
  8
+            console.error(err);
  9
+            process.exit(1);
  10
+        }
  11
+        
  12
+        fs.writeFileSync(fileOut, JSON.stringify(JSON.parse(json), null));
  13
+    });

0 notes on commit 846c6ff

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