reindent
v1.0.4
Published
Reindent and trim code
Downloads
42
Readme
reindent
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][downloads-url] [![Dependency Status][david-image]][david-url] [npm-image]: https://img.shields.io/npm/v/reindent.svg?style=flat-square [npm-url]: https://npmjs.org/package/reindent [downloads-image]: http://img.shields.io/npm/dm/reindent.svg?style=flat-square [downloads-url]: https://npmjs.org/package/reindent [david-image]: http://img.shields.io/david/chunpu/reindent.svg?style=flat-square [david-url]: https://david-dm.org/chunpu/reindent
Reindent and trim code
Installation
npm i reindent -g
Usage
God! it is too complex, close this project!
reindent *.js *.json
complex usage
find . -name '*.js' -exec reindent {} +
Option
Usage: reindent [options] <file ...>
Options:
-h, --help output usage information
-V, --version output the version number
-i, --in-place edit files in place like sed -i
-v, --verbose verbose info
--indent [val] code indent, default is tab
Support
- javascript
- json
Don't support below
if ()
code
use
if () code
or
if () {
code
}
Don't write open bracket at the end of comment
// something {
// it will be indented