Permalink
Browse files

Removed any-beautify. Changed to official js-beautify package.

  • Loading branch information...
1 parent 93ea61d commit e41dd0e7477815327d4a4af749d0263d1f32605c @clarkf committed Mar 21, 2013
Showing with 7 additions and 7 deletions.
  1. +2 −2 lib/beautifiers/js-beautify.js
  2. +1 −1 package.json
  3. +4 −4 test/beautifiers/js-beautify.js
@@ -1,4 +1,4 @@
-var beautify = require('any-beautify');
+var beautify = require('js-beautify');
exports = module.exports = function jsBeautify(stream, options, cb) {
var code = "";
stream.on('data', function (d) {
@@ -7,7 +7,7 @@ exports = module.exports = function jsBeautify(stream, options, cb) {
stream.on('end', function () {
try {
- code = beautify.js(code);
+ code = beautify.js_beautify(code);
} catch (e) {
cb(e);
}
View
@@ -26,7 +26,7 @@
"uglify-js": "~2.2",
"yuicompressor": "~2.4",
"closure-compiler": "~0.2",
- "any-beautify": "~0.8",
+ "js-beautify": "~0.4",
"optimist": "~0.3"
},
"devDependencies": {
@@ -2,7 +2,7 @@ var expect = require('expect.js'),
sinon = require('sinon'),
fs = require('fs'),
minify = require('../../'),
- beautify = require('any-beautify');
+ beautify = require('js-beautify');
function fixture(name) {
var path = __dirname + "/../fixtures/" + name;
@@ -12,16 +12,16 @@ function fixture(name) {
describe("MinifyJS", function () {
describe("`js-beautify` beautifier", function () {
it("should return the code", function (done) {
- sinon.spy(beautify, 'js');
+ sinon.spy(beautify, 'js_beautify');
minify.beautify(fixture("valid.js"), {
engine: 'js-beautify'
}, function (err, data) {
if (err)
throw err;
expect(data).to.be.a('string');
- expect(beautify.js.called).to.be(true);
- beautify.js.restore();
+ expect(beautify.js_beautify.called).to.be(true);
+ beautify.js_beautify.restore();
done();
})
});

0 comments on commit e41dd0e

Please sign in to comment.