grunt-text-replace
grunt-text-replace copied to clipboard
Support for files: [] ?
First, thanks for your plugin, I'm using it to great effect on my sites.
I have a case where I want to apply the same search/replaced to multiple files, but each with a distinct destination (with a prefix appended). It'd be convenient if I could do something like this:
replace: {
ssl_html: {
files: [
{src: '<%= pkg.template_path %>common_html.group/html_head_end.html', dest: '<%= pkg.template_path %>common_html.group/ssl_html_head_end.html'},
{src: '<%= pkg.template_path %>common_html.group/main_menu.html', dest: '<%= pkg.template_path %>common_html.group/ssl_main_menu.html'},
{src: '<%= pkg.template_path %>common_html.group/info_footer.html', dest: '<%= pkg.template_path %>common_html.group/ssl_info_footer.html'},
{src: '<%= pkg.template_path %>common_html.group/free_content_banner.html', dest: '<%= pkg.template_path %>common_html.group/ssl_free_content_banner.html'},
{src: '<%= pkg.template_path %>common_html.group/free_content_guts.html', dest: '<%= pkg.template_path %>common_html.group/ssl_free_content_guts.html'},
{src: '<%= pkg.template_path %>common_html.group/free_content_tabs.html', dest: '<%= pkg.template_path %>common_html.group/ssl_free_content_tabs.html'},
],
replacements: [
{
from: 'http://cssjs.crushlivepoker.net/',
to: '/site/'
},
{
from: 'http://cssjs.CrushLivePoker.net/',
to: '/site/'
},
},
],
},
},
...where it can accept an array of files with src: and dest: but the same replacements applied to each. Unless I'm doing something wrong, it appears to not be possible currently?