pingy-cli icon indicating copy to clipboard operation
pingy-cli copied to clipboard

disable minifying html when exporting from pug

Open Snailsloth opened this issue 7 years ago • 3 comments

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.

Snailsloth avatar Jul 09 '17 18:07 Snailsloth

ahah! Found it! node_modules\pug\lib\index.js just changed all "pretty: options.pretty," to "pretty: true," and everything is fine now.

Snailsloth avatar Jul 11 '17 11:07 Snailsloth

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 avatar Aug 15 '17 21:08 cdunlap

@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.

davej avatar Aug 16 '17 10:08 davej