question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

additonalStreams not merging streams

See original GitHub issue

I may just be missing something but I have my setup attempting to merge the output of the angular-templateCache stream with the assets stream. If I make the templateStream spit out to a destination, it produces a single JS file. I assume I can take the output of that stream and add it into the assets to be included into the assets stream.

gulp.task('usemin:dist', ['clean:dist'], function() {
  var templatesStream = gulp.src([
    './app/**/*.html',
    '!./app/index.html',
    '!./app/404.html'
  ]).pipe(templateCache({
    module: 'myCoolApp'
  }));

  var assets = $useref.assets({
    additionalStreams: [templatesStream]
  });

  return gulp.src('./app/index.html')
    .pipe(assets)
    .pipe(assets.restore())
    .pipe($useref())
    .pipe(gulp.dest('./dist/'));
});

After this runs, the resulting JS file does not have the templates contents (only the contents of the JS files that are in my html file).

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
urrricommented, Apr 7, 2016

I tried the same with the new version of useref 3.0.8 and it doesn’t work. When I add additionalStreams it immediately stops concatenate files, just copy them. But it replaces entries in index.html to target. In addition it tries to add templates.js (I see it via debug and comments in the file)at the beginning of the each section (I have 4) , never mind I add entry to the html or not.

0reactions
yuricamaracommented, Apr 8, 2016

Sure!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Merging Streams in Java - Baeldung
In this quick article, we explain different ways of merging Java Streams – which is not a very intuitive operation.
Read more >
Merging and Concatenating Streams - SmallRye Mutiny
Merging or concatenating streams is a frequent operation which consists in taking multiple streams and creating a new Multi out of them.
Read more >
flutter - Combine multiple streams not at the same time
Searching for a way to combine multiple streams into single stream but add each stream in different time without dropping the stream listeners....
Read more >
Merging down and copying up between streams - Perforce
To propagate change between streams that are not directly connected, click the Browse button on the Merge or Copy dialog, then click the...
Read more >
Merge Notes and Streams | Fellow Help Center
Note: While private/shared streams and meetings streams can be merged into each other, you'll only be able to merge content into a 1-on-1....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found