change
if (isDirectory(dest) && !config.orig.cwd) {
dest = path.join(dest, src);
}
to
if (isDirectory(dest) && !config.orig.cwd) {
dest = path.join(dest, path.basename(src));
}
and the config can be:
includereplace: {
html: {
options: {
},
src: 'src/.html',
dest: 'build/'
},
js: {
options: {
},
src: 'src/js/.js',
dest: 'build/js/'
}
}
change if (isDirectory(dest) && !config.orig.cwd) { dest = path.join(dest, src); } to if (isDirectory(dest) && !config.orig.cwd) { dest = path.join(dest, path.basename(src)); }
and the config can be: includereplace: { html: { options: { }, src: 'src/.html', dest: 'build/' }, js: { options: { }, src: 'src/js/.js', dest: 'build/js/' } }