How to use the replace function from gulp

Find comprehensive JavaScript gulp.replace code examples handpicked from public code repositorys.

40
41
42
43
44
45
46
47
48
49
50
function stripApacheLicense() {
  // Strip out Google's and MIT's Apache licences.
  // Closure Compiler preserves dozens of Apache licences in the Blockly code.
  // Remove these if they belong to Google or MIT.
  // MIT's permission to do this is logged in Blockly issue #2412.
  return gulp.replace(new RegExp(licenseRegex, "g"), '\n\n\n\n');
  // Replace with the same number of lines so that source-maps are not affected.
}


/**
fork icon0
star icon0
watch icon1

158
159
160
161
162
163
164
165
166
167
function stripApacheLicense() {
  // Strip out Google's and MIT's Apache licences.
  // Closure Compiler preserves dozens of Apache licences in the Blockly code.
  // Remove these if they belong to Google or MIT.
  // MIT's permission to do this is logged in Blockly issue #2412.
  return gulp.replace(new RegExp(licenseRegex, 'g'), '\n\n\n\n');
  // Replace with the same number of lines so that source-maps are not affected.
}

/**
fork icon0
star icon0
watch icon459

+ 3 other calls in file