jstransformers / jstransformer-html-beautify

JS Beautify HTML support for JSTransformers.
http://npm.im/jstransformer-html-beautify
MIT License
2 stars 1 forks source link

Support use of .jsbeautifyrc #6

Open brunowego opened 6 years ago

brunowego commented 6 years ago

I am trying use .jsbeautifyrc at root of project. I use this package with grunt-contrib-pug.

Does supporting this file fall within the scope of this package?

'use strict';

var beautify = require('js-beautify').html_beautify;

exports.name = 'html-beautify';
exports.outputFormat = 'html';

exports.render = beautify;

exports.render = function (str) {
  return beautify(str, {
    indent_size: 2,
    unformatted: []
  });
};
ForbesLindesay commented 6 years ago

I'd be happy to accept a pull request to support the same set of config locations as js-beauitfy lists: https://github.com/beautify-web/js-beautify#loading-settings-from-environment-or-jsbeautifyrc-javascript-only