gulp-buster icon indicating copy to clipboard operation
gulp-buster copied to clipboard

2 tasks, same manifest filename = cross-contamination

Open goosechaser opened this issue 10 years ago • 4 comments

I'm running 2 buster tasks using different source files but both outputting the manifest file with the same name, although in different directories. There are files from the first task that end up in the second, or vice versa. If the manifest filename is different, then all works fine.

goosechaser avatar Nov 24 '14 16:11 goosechaser

This is expected behavior, it is listed in the Architecture pros vs cons - https://github.com/UltCombo/gulp-buster#architecture

Right now, the output filename serves as the "manifest id" for the internal cache to work properly. Anything else would seem to overcomplicate this. Feel free to suggest improvements.

UltCombo avatar Nov 24 '14 16:11 UltCombo

My use case: 2 manifests, one for development and one for production environments. Each environment contains a different set of assets.

Perhaps a configuration option to disable that?

goosechaser avatar Nov 24 '14 16:11 goosechaser

Uhm, I see. This is an issue I've been considering for a while, but never gave it much thought as I'd like to avoid complicating the most common use cases.

As far as I can see, there are 2 options:

  • An workaround in your own code: pass a different filename to gulp-buster, then pipe the manifest file through gulp-rename to set the output name you'd like.
  • A real fix would be to have a manifestId/cacheId option in this plugin to solve your use case without hacks, which defaults to the output filename for back-compat.

UltCombo avatar Nov 24 '14 16:11 UltCombo

@UltCombo Option 2 sounds perfect. :)

benface avatar Jun 03 '16 15:06 benface