0.0.0-work-in-progress • Published 9 years ago

format-xml v0.0.0-work-in-progress

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

Travis – build status

Code climate

David – status of dependencies

Code style: airbnb

format-xml

A streaming XML beautifier.
Fully customizable.
Opt-in – no magic.

Heads up: This is a work in progress. Ideas and criticism are very welcome.

Installation

  1. Make sure you have Node.js or io.js. On Unix-like systems you’re best off with nvm. Windows have official installers.

  2. Install the CLI for your user:

$ npm install --global format-xml

Usage

Out of the box – minimal output:

$ format-xml < dirty.xml > clean.xml

Smart presets:

$ format-xml --preset svg < dirty.svg > clean.svg

CLI configuration:

$ format-xml --indent-string "\t" < dirty.xml > clean.xml

JSON or safe CSON configuration:

$ echo "indentString: '\t'" > .format-xml.cson
$ format-xml < dirty.xml > clean.xml
$ # or:
$ format-xml --config-file .format-xml.cson < dirty.xml > clean.xml

License

MIT © Tomek Wiszniewski