You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using gulp-hp to build email templates. For each template I build 2 a text version and an html version. To make this work, I have 2 sets of partials. One for each version. In order for the core templates to work with both sets, the partials need to have the same names.
I've set up gulp watch, so I don't need to run the tasks manually. If I change any of the core templates, both tasks trigger. At almost the same time. The problem is that the one that started second (by a few milliseconds), will overwrite the partials, and I end up with both versions of the templates being the same.
The cause of this seems to be, the glup-hb registers the partials and the helpers globally. The task that started first loads its partials, but then the other tasks loads its partials, overwriting those of the first task. The end result is that first tasks will render templates using the partials of the second task.
I think each task, and in turn each call to .pipe(hb(...)), should have its own set of registered partials, helpers...
The text was updated successfully, but these errors were encountered:
I'm using
gulp-hp
to build email templates. For each template I build 2 a text version and an html version. To make this work, I have 2 sets of partials. One for each version. In order for the core templates to work with both sets, the partials need to have the same names.I've set up
gulp watch
, so I don't need to run the tasks manually. If I change any of the core templates, both tasks trigger. At almost the same time. The problem is that the one that started second (by a few milliseconds), will overwrite the partials, and I end up with both versions of the templates being the same.The cause of this seems to be, the
glup-hb
registers the partials and the helpers globally. The task that started first loads its partials, but then the other tasks loads its partials, overwriting those of the first task. The end result is that first tasks will render templates using the partials of the second task.I think each task, and in turn each call to
.pipe(hb(...))
, should have its own set of registered partials, helpers...The text was updated successfully, but these errors were encountered: