Because I need to apply a uniform transformation across both includes and "includers", I locally altered include-replace to optionally apply the processIncludeContents function not only to includes, but also to top-level files.
If this is welcome, I'd like to provide a patch for this.
includereplace: {
dist: {
options: {
processIncludeContents: function (src, locals) {
// do sthg!
},
// if this is thruthy, all levels will be processed with `processIncludeContents`
processTopLevel: true
},
src: '*.html',
dest: 'dist/'
}
}
I can see how this would be useful. I'd like to not confuse the meaning of processIncludeContents though and have a processIncluderContents function as the new option.
Because I need to apply a uniform transformation across both includes and "includers", I locally altered include-replace to optionally apply the
processIncludeContents
function not only to includes, but also to top-level files.If this is welcome, I'd like to provide a patch for this.