Questions tagged [gulp-replace]

gulp-replace

A string replace plugin for

Usage

First, install gulp-replace as a development dependency:

npm install --save-dev gulp-replace Then, add it to your gulpfile.js: see details here

35 questions
38
votes
4 answers

How can I use gulp to replace a string in a file?

I am using gulp to uglify and make ready my javascript files for production. What I have is this code: var concat = require('gulp-concat'); var del = require('del'); var gulp = require('gulp'); var gzip = require('gulp-gzip'); var less =…
Alan2
  • 23,493
  • 79
  • 256
  • 450
4
votes
2 answers

How to use a Capture Group with gulp-replace?

gulp-replace 0.5.4 Current via gulp and rev: Goal: Result:
Dave
  • 84
  • 9
3
votes
1 answer

What's the most efficient way to read, rebuild, and replace a block of content in a file using Gulp?

I'm creating a system that can read through any file (php, jsp, html, etc), locate block tags, and do a replacement based on the information in the block tag. Code I would write into my file: { "testObject": { …
toad
  • 400
  • 2
  • 13
2
votes
1 answer

Inject content of an HTML to another html using gulp

I have 2 html files index.html and build.html. build.html