-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concat and replace files #43
Comments
+1 |
1 similar comment
+1 |
I ended up writing gulp-markers because of this. I originally used gulp-html-replace but the code to handle optional file concatenation was convoluted and hard to maintain. gulp-markers is really a thin wrapper around RegExp.replace() that handles streams and buffers for gulp. It's not as easy to use - you have to define your own markers (regular expressions) and replacements strings or function, just like RegExp replace. But it's this particular use, inserting non-concatenated files for development and concatenated files for production, that pushed me there. If interested, here it is: https://github.com/bmacnaughton/gulp-markers/blob/master/README.md. If you read to the bottom of my README you'll find that gulp-html-replace was what got me started down this whole path. I owe a debt to VFK for kicking this off and helping me get started in the whole area. |
With gulp-userref I can concat script files into one, minify the result and replace the script tags with the new minified script. I can't see how that is possible in gulp-html-replace - is it?
OTH gulp-html-replace will let me replace a block with something I specify and gulp-userref doesn't do this.
I need to be able to perform both of these tasks.
Thanks for very useful gulp plugin.
The text was updated successfully, but these errors were encountered: