BlessCSS / gulp-bless

Gulp plugin which splits CSS files suitably for Internet Explorer < 10
http://www.adamlynch.com
MIT License
50 stars 21 forks source link

Issue using gulp-bless and gulp-rev #41

Open MannyC opened 7 years ago

MannyC commented 7 years ago

I had an issue using this plug-in in conjunction with gulp-rev

Gulp-rev stores some metadata on the vinyl files which it later uses to create a manifest.

Because gulp-bless creates new vinyl files even if it isn't splitting the file, when I run the initial gulp-rev before gulp-bless, none of my css ended up being added to the revision manifest files as the new files don't have the metadata attached.

Currently I am instead running gulp-bless first, then gulp-rev, and then using gulp-rev-replace to update the import(s) in the blessed files (as the second and subsequent files will be renamed by rev).

This works. Another solution would be to copy the metadata into the first of the split files, and into unsplit files. I think that would be my preferred solution, as the rev'd naming convention would make slightly more sense, and it's more likely to just work when introduced into a gulp-rev workflow.

Even if you choose not to address this, then at least this issue can document a workaround.

adam-lynch commented 7 years ago

Thanks for this. This could hypothetically happen with a lot of other plugins. On one hand I see that we could copy the metadata but on the other hand, someone could argue that that isn't always right. Like what if the metadata property has to be unique or is somehow related to the content of the file. I'm not sure.