How to use the gulp-replace.call function in gulp-replace

To help you get started, we’ve selected a few gulp-replace examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nguymin4 / react-videocall / client / tasks / gulpProd.js View on Github external
gulp.task("html", function () {
		var src = gulp.src(input.html.target);

		// Add meta data
		for (var keyword in metaData) {
			var meta = metaData[keyword];
			if (typeof meta !== "string")
				meta = env.isProduction ? meta["build"] : meta["dev"];
			meta = (meta || "").replace(/[\n\t]/g, "");
			src = src.pipe(replace.call(this, "${" + keyword + "}", meta));
		}

		return src.pipe(gulp.dest(output.html));
	});

gulp-replace

A string replace plugin for gulp

MIT
Latest version published 1 year ago

Package Health Score

59 / 100
Full package analysis