{"id":20855953,"url":"https://github.com/solodynamo/gulp-findreplace","last_synced_at":"2025-05-12T06:31:26.247Z","repository":{"id":57257564,"uuid":"80991473","full_name":"solodynamo/gulp-findreplace","owner":"solodynamo","description":"A gulp plugin that finds ಠ_ಠ and replaces strings.","archived":false,"fork":false,"pushed_at":"2017-03-01T14:48:55.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T14:18:38.965Z","etag":null,"topics":["find-and-replace","gulp","gulp-plugins","gulp-stream","regex"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gulp-findreplace","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solodynamo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-05T12:31:12.000Z","updated_at":"2017-03-13T14:00:54.000Z","dependencies_parsed_at":"2022-08-25T19:11:56.093Z","dependency_job_id":null,"html_url":"https://github.com/solodynamo/gulp-findreplace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solodynamo%2Fgulp-findreplace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solodynamo%2Fgulp-findreplace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solodynamo%2Fgulp-findreplace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solodynamo%2Fgulp-findreplace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solodynamo","download_url":"https://codeload.github.com/solodynamo/gulp-findreplace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253687531,"owners_count":21947692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["find-and-replace","gulp","gulp-plugins","gulp-stream","regex"],"created_at":"2024-11-18T04:27:26.190Z","updated_at":"2025-05-12T06:31:25.959Z","avatar_url":"https://github.com/solodynamo.png","language":"JavaScript","readme":"# gulp-findreplace [![NPM version][npm-image]][npm-url] [![download-image]][npm-url] [![Build status][travis-image]][travis-url]\n\u003e A gulp plugin that streamingly replaces matching strings with provided replacement string ⚡️\n\n## Usage\n\nFirst, install `gulp-findreplace` as a development dependency:\n\n```shell\nnpm install --save-dev gulp-findreplace\n```\n\nThen, add it to your `gulpfile.js`:\n\n### Regex Replace\n```javascript\nvar freplace = require('gulp-findreplace');\n\ngulp.task('replaceIt', function(){\n  gulp.src(['example.txt'])\n    .pipe(freplace(/foo(.{3})/g, 'foo'))\n    .pipe(gulp.dest('build/example.txt'));\n});\n```\n### String Replace\n```javascript\nvar freplace = require('gulp-findreplace');\n\ngulp.task('replaceIt', function(){\n  gulp.src(['example.txt'])\n    .pipe(freplace('love', 'code'))\n    .pipe(gulp.dest('build/example.txt'));\n});\n```\nYou can also refer to an example provided in ./examples directory.\n\n\n## API\n\ngulp-findreplace works with streams and even if it encounter a file as a buffer it converts it to a stream then operates with provided string or regex.\n\n### freplace(stringQuery, replacement)\n\n#### stringQuery\nType: `String`\n\nThe string to search for.\n\n#### replacement\nType: `String`\n\nThe replacement string or function. If `replacement` is a function, it will be called once for each match and will be passed the string that is to be replaced.\n\n### freplace(regex, replacement)\n\n#### regex\nType: `RegExp`\n\nThe regex pattern to search for. See the [MDN documentation for RegExp] for details.\n\n#### replacement\nType: `String`\n\n[travis-url]: http://travis-ci.org/solodynamo/gulp-findreplace\n[travis-image]: https://travis-ci.org/solodynamo/gulp-findreplace.svg?branch=master\n[npm-url]: https://www.npmjs.com/package/gulp-findreplace\n[npm-image]: https://badge.fury.io/js/gulp-findreplace.svg\n[download-image]: https://img.shields.io/badge/Downloads-200%2B-Pink.svg\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolodynamo%2Fgulp-findreplace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolodynamo%2Fgulp-findreplace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolodynamo%2Fgulp-findreplace/lists"}