briangonzalez / gulp-file-contents-to-json

Slurp in some files, output a JSON representation of their contents.
12 stars 5 forks source link

When using flat=true and array of files, I lose some of the files #10

Closed aberonni closed 6 years ago

aberonni commented 6 years ago

When configuring like this:

gulp.task('create-json-blob', function() {
  gulp.src([
          'src/html/file1.html',
          'src/html/folder/file2.html',
          'src/html/folder/file3.html',
      ])
      .pipe(fc2json('contents.json', {
          flat: true
       }))
      .pipe(gulp.dest('./dist/'));
});

I only get the first file in the output. If I change the order and move the first file to the end, I only get the other two files.

PR to fix this is on its way.