Skip to content

Instantly share code, notes, and snippets.

@ptaferner
Created November 30, 2015 14:38
Show Gist options
  • Save ptaferner/4b33c4137cc0564d4308 to your computer and use it in GitHub Desktop.
Save ptaferner/4b33c4137cc0564d4308 to your computer and use it in GitHub Desktop.
CLI script for node modules
#!/usr/bin/env node
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(data) {
var pd = require('pretty-data').pd;
var xml_min = pd.xmlmin(data,true);
process.stdout.write(xml_min);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment