Unminified output #65

Open
ghost opened this Issue Oct 2, 2012 · 5 comments

Comments

Projects
None yet
3 participants
@ghost

ghost commented Oct 2, 2012

Is there a way making hiccup generate unminified output so it would be easier to debug in the browser?

Owner

weavejester commented Oct 2, 2012

Not with the current version (because it outputs directly to a string). However, most (all?) modern browsers allow you to look at the DOM of the page. Viewing the raw source usually isn't necessary.

@ghost

ghost commented Oct 2, 2012

Can't newline characters with correct indentation be added for making the initial HTML document readable?

When using a framework it adds a lot of custom elements/attributes making debugging harder if we are depending on the web inspector.

Owner

weavejester commented Oct 2, 2012

Can't newline characters with correct indentation be added for making the initial HTML document readable?

No, because it outputs directly to strings. In order to produce correct indentation you need the whole DOM, which is planned for version 2.0.

👍

dwhite44 commented Oct 1, 2015

It would definitely be nice to have some minify options with hiccup. I don't necessarily need unminified but I would like an option to have a space between each element to help with spacing problems that can result from having no whitespace between elements such as this bootstrap issue: twbs/bootstrap#14401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment