[Fixed] How can express and jade does not compress html?

Issue

I using express and jade, but when I debug I doesn’t want jade compress my html, are there any way to pass an option jade globally and make it does not compress html.

Solution

In the time since this answer was written an option has been added to control this behaviour.

app.locals.pretty = true;

At the moment, no. This feature has been discussed here:

https://github.com/visionmedia/jade/pull/205

The html doesn’t actually get compressed or minified by default, though. It’s just not formatted nicely. The simplest way I’ve found to make it human-readable is to use Chrome’s dev tools, which give you a nice foldable representation of the source.

Leave a Reply

(*) Required, Your email will not be published