pingy-cli
pingy-cli copied to clipboard
disable minifying html when exporting from pug
Hello. First of all - thanks for the work you've done, pingy really helps me, until I learned gulp well. I've been trying to find an answer in google for two days but without success: is it possible to turn off html minification while exporting pug files? I have tried to add
{
"path": "*.html",
"action": "dontCompile",
"type": "file"
},
{
"path": "dist/*.html",
"action": "dontCompile",
"type": "file"
}
(also tried "exclude") and remove minify:true from pingy.json, but nothing works. As a result, after export it turned out or not the compiled pug or the minified html. I will be grateful for any hint. thanks!
upd: Well, It is never too late to learn! I realized that I had to change "pretty" parameter to true for . I still do not know where though.
ahah! Found it!
node_modules\pug\lib\index.js
just changed all "pretty: options.pretty," to "pretty: true," and everything is fine now.
You had to modify the library to get this to work? So there actually is no way to control this via an external config or via command line?
@cdunlap At the moment you can only set minify
globally for all JS/CSS/HTML. I'll reopen this because I think the feature might be a useful feature for some people.
edit: Furthermore, Pug will compress whitespace by default, so setting the minify
option to false doesn't really have much of an effect if you're using Pug.