title: How can I insert the contents of a file in my index.html with gulp-inject?
body: <p>Here's what I have tried so far:</p>
  
  <pre><code>gulp.task('watch-index-html', function () {
      gulp.watch(files, function (file) {
          return gulp.src('index/index.html')
              .pipe(inject(gulp.src(['index/base3.html']), {
                  starttag: '&lt;!-- inject:base3:html --&gt;'
              }))
              .pipe(print(function (file) {
                  return "Processing " + file;
               }))
              .pipe(gulp.dest('./'));
      });
  });
  </code></pre>
  
  <p>Here's what happened:</p>
  
  <p>Before:</p>
  
  <pre><code>&lt;body&gt;
      abcd
      &lt;!-- inject:base3:html --&gt;
      &lt;!-- endinject --&gt;
      efgh
  </code></pre>
  
  <p>After:</p>
  
  <pre><code>&lt;body&gt;
      abcd
  &lt;!-- inject:base3:html --&gt;
  &lt;link rel="import" href="/index/base3.html"&gt;
  &lt;!-- endinject --&gt;
      efgh
  </code></pre>
  
  <p>What I expected to see was the actual contents of the file, not the line:  </p>
  
  <pre><code>&lt;link rel="import" href="/index/base3.html"&gt;
  </code></pre>
  
  <p>Can anyone tell me if I can do this "inserting contents of a file" with <code>gulp-inject</code> or if there's something else I should use. Note in the past I tried using <code>gulp-mustache</code> but I had problems where it seemed to insert the character (65279). I assume this was something related to the following question, but I was never able to get mustache to work for me:</p>
  
  <p><a href="https://stackoverflow.com/questions/6538203/how-to-avoid-echoing-character-65279-in-php-this-question-also-relates-to-java">How to avoid echoing character 65279 in php? (This question also relates to Javascript xmlhttp.responseText (ajax))</a></p>
  
  <p>I hope someone can give me some advice either with <code>gulp-inject</code> or with <code>gulp-mustache</code> or any other way to insert the contents of a file in another file.</p>