fs.readFile(file, 'utf8', (readErr, data) => {
let content = null;
urls.forEach((url) => {
content = `${content === null ? data : content}`.replace(url, `"<% static ${url} %>"`);
});
});
fs.readFile(file, 'utf8', (readErr, data) => {
urls.forEach((url) => {
data = data.replace(url, `"<% static ${url} %>"`);
});
});
fs.readFile(file, 'utf8', (readErr, data) => {
const content = urls.reduce((content, url) => {
return content.replace(url, `"<% static ${url} %>"`);
}, data);
});