Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable minifying html when exporting from pug #48

Open
Snailsloth opened this issue Jul 9, 2017 · 3 comments
Open

disable minifying html when exporting from pug #48

Snailsloth opened this issue Jul 9, 2017 · 3 comments
Milestone

Comments

@Snailsloth
Copy link

Snailsloth commented Jul 9, 2017

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
Copy link
Author

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

@cdunlap
Copy link

cdunlap commented Aug 15, 2017

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?

@davej
Copy link
Member

davej commented Aug 16, 2017

@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 davej reopened this Aug 16, 2017
@davej davej added this to the v0.9 milestone Sep 27, 2017
@davej davej modified the milestones: v0.10, post-v1.0 Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants