gulp-html-replace
gulp-html-replace copied to clipboard
Added %d as an extended replacement for directory name
This is my first pull request. Hopefully, everything is in line. This change would allow the use of the file's directory name in replacements. It would be helpful for multi-entry applications.
// Replacement based on the file being processed
// Stream contains ['\root\views\map\index.js', '\root\views\home\index.js']
htmlreplace({
js: {
src: null,
tpl: '<script src="%d.%f.bundle.js"></script>'
}
})
// Outputs: <script src="map.index.bundle.js"></script>, <script src="home.index.bundle.js"></script>
Please let me know if I can improve my request. Best regards, Joe