What's the most efficient way to read, rebuild, and replace a block of content in a file using Gulp?
问题 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