{"id":19816708,"url":"https://github.com/welldone-software/gulp-inject-self","last_synced_at":"2025-10-17T15:09:11.824Z","repository":{"id":35188439,"uuid":"39446449","full_name":"welldone-software/gulp-inject-self","owner":"welldone-software","description":"gulp-inject-self","archived":false,"fork":false,"pushed_at":"2015-09-29T07:55:57.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-10-04T09:37:49.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"yjwfn/RulerView","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/welldone-software.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":"2015-07-21T13:19:51.000Z","updated_at":"2015-07-21T13:35:32.000Z","dependencies_parsed_at":"2022-09-15T11:22:48.425Z","dependency_job_id":null,"html_url":"https://github.com/welldone-software/gulp-inject-self","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/welldone-software/gulp-inject-self","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-inject-self","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-inject-self/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-inject-self/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-inject-self/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/welldone-software","download_url":"https://codeload.github.com/welldone-software/gulp-inject-self/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-inject-self/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279366641,"owners_count":26156467,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T10:10:25.924Z","updated_at":"2025-10-17T15:09:11.786Z","avatar_url":"https://github.com/welldone-software.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-inject-self\n\nA [Gulp](http://gulpjs.com/) that injects self stream to a destination file.\n\n\u003e for stream.txt:\n\u003e```\n\u003emy own file\n\u003e```\n\u003eand for dest.txt:\n\u003e```\n\u003edest\n\u003einsert here\n\u003edest\n\u003e```\n\u003e the code\n\u003e```js\n\u003evar injectSelf = require('gulp-inject-self');\n\u003egulp.task('inject', function(){\n\u003e    return gulp.src('stream.txt')\n\u003e       .pipe(injectSelf('dest.txt', /insert here/))\n\u003e       .pipe(gulp.dest('.'));\n\u003e}\n\u003e```\n\u003eoutputs stream.txt with the content:\n\u003e```\n\u003edest\n\u003emy own file\n\u003edest\n\u003e```\n\u003e and the code\n\u003e```js\n\u003evar injectSelf = require('gulp-inject-self');\n\u003egulp.task('inject', function(){\n\u003e    return gulp.src('stream.txt')\n\u003e       .pipe(injectSelf('dest.txt', /insert here/, {\n\u003e            replaceWith: function(fileContent){\n\u003e                return '$\u0026\\n' + fileContent; //the string being replaced, new line, file content from the stream\n\u003e            }\n\u003e       }))\n\u003e       .pipe(gulp.dest('.'));\n\u003e}\n\u003e```\n\u003eoutputs stream.txt with the content:\n\u003e```\n\u003edest\n\u003einsert here\n\u003emy own file\n\u003edest\n\u003e```\n\n## Getting Started\nThis plugin requires Gulp `~3.5.5`\n\nIf you haven't used [Gulp](http://gulpjs.com/) before, be sure to check out the [Getting Started](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md#getting-started) guide, as it explains how to create a [Gulpfile](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md#3-create-a-gulpfilejs-at-the-root-of-your-project) as well as install and use Gulp plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install gulp-inject-self --save-dev\n```\n\nOnce the plugin has been installed, it should be required inside your Gulpfile:\n\n```js\nvar injectSelf = require('gulp-inject-self');\n```\n\n### Options\n\n#### options.replaceWith\nType: `Function`\nDefault value: `function(contents){ return contents; }`\n\nPreprocessing the contents of file from the gulp stream when replace is applied on the target file.\n\n#### options.skipBinary\nType: `Boolean`\nDefault value: `false`\n\nShould binary files be skipped.\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Gulp](http://gulpjs.com/).\n\n## Release History\n - 0.0.1 - initial release.\n - 1.0.0 - added tests, fixed bugs.\n\n## License\n[MIT](https://github.com/welldone-software/gulp-inject-self/blob/master/LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelldone-software%2Fgulp-inject-self","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelldone-software%2Fgulp-inject-self","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelldone-software%2Fgulp-inject-self/lists"}