rickeyski / node-beautifier Goto Github PK
View Code? Open in Web Editor NEWA nodejs-cli for einars {js,css,html}-beautifier
License: MIT License
A nodejs-cli for einars {js,css,html}-beautifier
License: MIT License
You gotta:
npm publish beautifiier.tgz
I can see from your merges that you're tracking the https://github.com/einars/js-beautify. As you can see we're working to get an npm package merged in from another contributor. Once that is complete, you won't have to maintain a separate project.
Just a thought.
It would be really useful if this utility would accept content from Stdin optionally in place of the path argument. This would allow for piping of content from other programs such as Curl or Httpie.
For this to work it may be necessary to include another optional argument for defining the content type (html, js, css). This option would be nice to have regardless in potential situations where the content you are working with is in a file that does not have a proper extension.
Examples:
curl -s http://code.jquery.com/jquery-1.11.0.min.js | beautifier -t js
curl -s http://code.jquery.com/jquery-1.11.0.min.js | beautifier -t js > jquery-1.11.0.js
beautifier -t js file-with-no-ext
Would be nice to allow writing back to the input file.
eg, Someone may want to change a whole bunch of files in DIR. Something like
beautifier -o *.css
could be awesome.
installed this via npm, had to sym link my homebrew installed node to /usr/bin/node to get it to work, but now when I run
beautifier myfile.js
I get two lots of output. Any ideas?
would be helpful.
Thanks for this tool anyway.
TypeError: Property 'beauty' of object # is not a function
at /Users/mrobben/devproj/sold-backend/node_modules/beautifier/bin/beautifier.js:3:478
at fs.readFile (fs.js:176:14)
at Object.oncomplete (fs.js:297:15)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.