Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
drop dependency of node-json-minify, use JSON.stringify to minify json
Browse files Browse the repository at this point in the history
* node-json-minify will have performance issue with large json files
  • Loading branch information
PeterDaveHello committed May 20, 2015
1 parent dfd45d8 commit d55206a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var onHeaders = require('on-headers');

var uglifyjs = require('uglify-js');
var cssmin = require('cssmin');
var jsonMinify = require("node-json-minify");
var sass;
var less;
var stylus;
Expand Down Expand Up @@ -135,7 +134,7 @@ function minifyIt(type, options, content, callback) {
result = content;
try {
if (!options.noMinify) {
result = jsonMinify(content);
result = JSON.stringify(JSON.parse(content));
}
} catch (ignore) {
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"coffee-script": "^1.9.2",
"cssmin": "^0.4.3",
"less": "^2.5.0",
"node-json-minify": "^0.1.3-a",
"node-sass": "^3.1.1",
"on-headers": "^1.0.0",
"stylus": "^0.51.1",
Expand Down

0 comments on commit d55206a

Please sign in to comment.