I'm creating a system that can read through any file (php, jsp, html, etc), locate block tags, and do a replacement based on the information in the block tag.
Code I would write into my file:
<!-- build:<name> -->
{
"testObject": {
"name": "jonathan",
"number": 3,
"male": true
}
}
<!-- endBuild -->
Desired replacement:
<h1>Jonathan</h1>
<p>is a male and is positioned at #3.</p>
As you may notice, I've used components of gulp-html-replace. I've researched gulp-data and know how to use gulp.src and gulp.dest to build out files. Just missing the read, build, and replace the object step. Ideally this will work on multiple object instances throughout the document. Thanks.