gulp-replace
- Version 1.1.4
- Published
- 15.1 kB
- 5 dependencies
- MIT license
Install
npm i gulp-replace
yarn add gulp-replace
pnpm add gulp-replace
Overview
A string replace plugin for gulp
Index
Functions
Functions
function replace
replace: ( search: string | RegExp, replacement: string | Replacer, options?: Options) => NodeJS.ReadWriteStream;
Searches and replaces a portion of text using a
string
or aRegExp
.Parameter search
The
string
orRegExp
to search for.Parameter replacement
The replacement string or a function for generating a replacement.
If
replacement
is a function, it will be called once for each match and will be passed the string that is to be replaced. The value ofthis.file
will be equal to the vinyl instance for the file being processed.Read more at [
String.prototype.replace()
at MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter").Parameter options
options.skipBinary
will be equal totrue
by default.Skip binary files. This option is
true
by default. If you want to replace content in binary files, you must explicitly set it tofalse
.
Package Files (1)
Dependencies (5)
Dev Dependencies (7)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/gulp-replace
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/gulp-replace)
- HTML<a href="https://www.jsdocs.io/package/gulp-replace"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3995 ms. - Missing or incorrect documentation? Open an issue for this package.