dciccale / grunt-processhtml

Process html files at build time to modify them depending on the release environment
MIT License
407 stars 30 forks source link

To keep placeholder comments especially for include #101

Closed kalidema closed 8 years ago

kalidema commented 8 years ago

Is there any possibility to keep placeholder comments especially for include. Let's take a hypothetical case. If I am developing a template which has a header or sidebar region wherein they are all nav links, search box…

These regions are repeated on every page but also are updated very often. It will be great to keep comments until dist task, because I would like to include this part during development to see the changes. This is the reason why for me placeholder comments are necessary until distribution. Perhaps you could consider in the future as additional option. A simple solution could be e.g. grunt.initConfig({ processhtml: { dev: { options: { stripPlaceholder: false } }, dist: { options: { stripPlaceholder: true } } }, });

dciccale commented 8 years ago

I think I didn't get what you need.

if you target your comments between different environments dist dev or whatever, and you run grunt processhtml:dev only dev targets will be affected.

dciccale commented 8 years ago

anything new here ? how can i help

dciccale commented 8 years ago

feel free to re-open in case of further discussion. thanks for your contribution

arjunkalburgi commented 7 years ago

I think I'm trying to do something similar.

I want to add a line to my html file, and retain the ability to add another line.

So what I've done in my grunt is: image

Where themelink is: image

The problem is processhtml tries to replace the newTheme in themelink too! So I get a newTheme not defined warning and thus doesn't run.

Edit: The quote/code styles aren't working, sorry for the lame pictures