{"action":"created","issue":{"url":"https://api.github.com/repos/klei/gulp-inject/issues/164","repository_url":"https://api.github.com/repos/klei/gulp-inject","labels_url":"https://api.github.com/repos/klei/gulp-inject/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/klei/gulp-inject/issues/164/comments","events_url":"https://api.github.com/repos/klei/gulp-inject/issues/164/events","html_url":"https://github.com/klei/gulp-inject/issues/164","id":136953160,"number":164,"title":"options.empty doesn't empty","user":{"login":"randycasburn","id":1176839,"avatar_url":"https://avatars.githubusercontent.com/u/1176839?v=3","gravatar_id":"","url":"https://api.github.com/users/randycasburn","html_url":"https://github.com/randycasburn","followers_url":"https://api.github.com/users/randycasburn/followers","following_url":"https://api.github.com/users/randycasburn/following{/other_user}","gists_url":"https://api.github.com/users/randycasburn/gists{/gist_id}","starred_url":"https://api.github.com/users/randycasburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randycasburn/subscriptions","organizations_url":"https://api.github.com/users/randycasburn/orgs","repos_url":"https://api.github.com/users/randycasburn/repos","events_url":"https://api.github.com/users/randycasburn/events{/privacy}","received_events_url":"https://api.github.com/users/randycasburn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-27T18:43:23Z","updated_at":"2016-03-01T15:08:48Z","closed_at":null,"body":"UseCase: as part of a 'clean everything' strategy, I want to clean out my injections so I can restore my index.html file to its pristine state.\r\n\r\nSteps to recreate: \r\n\r\n1. use gulp-inject to inject css & js in the most basic way\r\n2. use gulp-inject with an empty stream\r\n3. set {empty: true} as options\r\n4. execute task\r\n\r\nThis is my gulp task:\r\n\r\ngulp task: \r\n\r\n`gulp.task('clean-staged-links-from-index.html', function(){\r\n    return gulp.src(injectTarget)\r\n        .pipe(inject(gulp.src('EMPTY'),{empty: true}))\r\n        .pipe(gulp.dest(srcDir));\r\n});\r\n`"},"comment":{"url":"https://api.github.com/repos/klei/gulp-inject/issues/comments/190760694","html_url":"https://github.com/klei/gulp-inject/issues/164#issuecomment-190760694","issue_url":"https://api.github.com/repos/klei/gulp-inject/issues/164","id":190760694,"user":{"login":"HichemBenChaaben","id":2309959,"avatar_url":"https://avatars.githubusercontent.com/u/2309959?v=3","gravatar_id":"","url":"https://api.github.com/users/HichemBenChaaben","html_url":"https://github.com/HichemBenChaaben","followers_url":"https://api.github.com/users/HichemBenChaaben/followers","following_url":"https://api.github.com/users/HichemBenChaaben/following{/other_user}","gists_url":"https://api.github.com/users/HichemBenChaaben/gists{/gist_id}","starred_url":"https://api.github.com/users/HichemBenChaaben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HichemBenChaaben/subscriptions","organizations_url":"https://api.github.com/users/HichemBenChaaben/orgs","repos_url":"https://api.github.com/users/HichemBenChaaben/repos","events_url":"https://api.github.com/users/HichemBenChaaben/events{/privacy}","received_events_url":"https://api.github.com/users/HichemBenChaaben/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T15:08:48Z","updated_at":"2016-03-01T15:08:48Z","body":"@randycasburn it's a bug, the empty option  and the transformer function are both working if the stream returned have files.\r\n\r\nwhat should happen is if the stream returned is empty, it should remove the content of the inject tags"}}