gulp-html-replace
gulp-html-replace copied to clipboard
Support useref like blocks
To support parsing useref blocks ie.
<!-- build:css combined/style.css -->
regex could become:
var regex = /(\n?)([ \t]*)(<!--\s*build:(\w+(?:-\w+)*)\s+[^-]*\s*-->)\n?([\s\S]*?)\n?(<!--\s*endbuild\s*-->)\n?/ig;
I need html replacement to work aside useref.
@gunzip I'm not sure about this one. The whole point of this plugin is not to work like useref and instead provide what i think is a better way of achieving this task. Plus what's the point in recreating some other library? If you need this particular syntax then why don't just use useref? Or if the syntax doesn't matter then why don't change it so gulp-html-replace can work with it? What's your use case?
My use case consist in
- collecting assets list through useref
- use gulp-rev generate a manifest
- use gulp-html-replace to do some custom replacement using the generated manifest
if i could collect assets through gulp-html-replace this is not needed indeed. If you think i't's an edge case feel free to close the issue anyway =)