index.js
function replaceFilePlaceholders(oFile, aReplacementRules) {
  // parse file
  const sRaw = oFile.contents.toString('utf8')
  const sUpdatedFile = aReplacementRules.reduce((oResult, oRule) => {
    return oResult.replace(oRule.identifier, oRule.content)
  }, sRaw)

  // update new raw content
  oFile.contents = new Buffer(sUpdatedFile)

  // return updated file
  return oFile
}
function replaceFilePlaceholders(oFile, aReplacementRules) {
  // parse file
  const sRaw = oFile.contents.toString('utf8')
  const sUpdatedFile = aReplacementRules.reduce((oResult, oRule) => {
    return oResult.replace(oRule.identifier, oRule.content)
  }, sRaw)

  // update new raw content
  oFile.contents = new Buffer(sUpdatedFile)

  // return updated file
  return oFile
}
function replaceFilePlaceholders ( oFile , aReplacementRules ) { // parse file const sRaw = oFile . contents . toString ( 'utf8' ) const sUpdatedFile = aReplacementRules . reduce ( ( oResult , oRule ) => { return oResult . replace ( oRule . identifier , oRule . content ) } , sRaw ) // update new raw content oFile . contents = new Buffer ( sUpdatedFile ) // return updated file return oFile }
replace a list of placeholders with a list of string contents
replace a list of placeholders with a list of string contents