beautifier / js-beautify

Beautifier for javascript
https://beautifier.io
MIT License
8.51k stars 1.36k forks source link

(meta) resolve javascript, html and css packaging #193

Open einars opened 11 years ago

einars commented 11 years ago

Someone expressed a need and wish to port the beautify-html and beautify-css to python, so do we declare "yes, yes, we do support basic html and css formatting" now and consolidate the apis?

bitwiseman commented 11 years ago

I've filed separate issues for the porting. What did you mean by "consolidate the apis"?

einars commented 11 years ago

We have the initial js_beautify, and style_html and css_beautify added later, powered by magic and unburdened by tests, each taking different-ish options — seems chaotic.

evocateur commented 11 years ago

I feel like the HTML and CSS beautifiers should be a separate project. They are certainly reminiscent of a particular version of the JS API they were copied/adapted from, but they are not in my mind "spiritual equals" under the rubric of a JS beautifier. They were contributed, accepted graciously, but as noted, unburdened by tests and scarcely updated since addition.

I made an effort to at least document the random options whilst developing the node CLI. They are indeed very chaotic, which lends weight in my mind to splitting them out into a separate project. Perhaps, if there is interest, a "meta-project" could be created that provides all three at once (front-end-beautifier or somesuch).

bitwiseman commented 11 years ago

Yeah, it is a bit confusing to have them packaged into the same project.

It doesn't even have to be a meta-project, it could just be html-beautify, which includes handling of inline css and depends on js-beautify for handling inline javascript.

At the same time, jsbeautifier.org, which is contained in the gh-pages branch, depends on the html beautifier while beautify.js does not. If we were to split html and css out, it would make sense to also break out the jsbeautifier.org code into a separate repository to avoid a confusing dependency graph.

bitwiseman commented 11 years ago

@einars - Any opinion here?