gobble-jsbeautify

Beautify JavaScript files with gobble and jsbeautifier

1 个版本
安装
npm install gobble-jsbeautify
yarn add gobble-jsbeautify
pnpm add gobble-jsbeautify
bun add gobble-jsbeautify
README

gobble-jsbeautify

Beautify JavaScript files with gobble and js-beautify.

Installation

First, you need to have gobble installed - see the gobble readme for details. Then,

npm i -D gobble-jsbeautify

Usage

gobblefile.js

var gobble = require( 'gobble' );
module.exports = gobble( 'uglycode' ).map( 'jsbeautify', jsBeautifyOptions );

The js-beautify options are as per the documentation.

Source code

module.exports = jsbeautify;

function jsbeautify ( code, options ) {
  return require( 'js-beautify' ).js_beautify( code, options );
}

jsbeautify.defaults = {
  accept: '.js'
};

License

MIT. Copyright 2014 Rich Harris

版本列表
0.1.0 2014-08-17