gulp-buster
gulp-buster copied to clipboard
2 tasks, same manifest filename = cross-contamination
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.
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.
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?
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 Option 2 sounds perfect. :)