jsoverson / preprocess

Preprocess HTML, JavaScript, and other files with directives based off custom or ENV configuration
Other
366 stars 80 forks source link

preprocess files only for set variables #117

Open etiennewan opened 8 years ago

etiennewan commented 8 years ago

I would like to use preprocess as many times as I want to inject variables in my files when they are set, and keep the directives when a variable is undefined.

In my use case (take it as an example), I use preprocess for blog posts. First, I create a post and I inject the title. Then, when I finish writing the article, I ask to set the date and to set tags. And between my final rewiew and the publish, I would like to set the URL for comments from an external service.

At each step, I would like only to preprocess directives when the variables that are echoed are set, and keep for future iterations the remaining directives.