{"action":"created","issue":{"url":"https://api.github.com/repos/jonkemp/gulp-useref/issues/144","labels_url":"https://api.github.com/repos/jonkemp/gulp-useref/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/jonkemp/gulp-useref/issues/144/comments","events_url":"https://api.github.com/repos/jonkemp/gulp-useref/issues/144/events","html_url":"https://github.com/jonkemp/gulp-useref/issues/144","id":115469166,"number":144,"title":"How to inject a file which is not in the HTML markup block?","user":{"login":"justqyx","id":1448539,"avatar_url":"https://avatars.githubusercontent.com/u/1448539?v=3","gravatar_id":"","url":"https://api.github.com/users/justqyx","html_url":"https://github.com/justqyx","followers_url":"https://api.github.com/users/justqyx/followers","following_url":"https://api.github.com/users/justqyx/following{/other_user}","gists_url":"https://api.github.com/users/justqyx/gists{/gist_id}","starred_url":"https://api.github.com/users/justqyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justqyx/subscriptions","organizations_url":"https://api.github.com/users/justqyx/orgs","repos_url":"https://api.github.com/users/justqyx/repos","events_url":"https://api.github.com/users/justqyx/events{/privacy}","received_events_url":"https://api.github.com/users/justqyx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-06T09:34:38Z","updated_at":"2015-11-09T14:22:38Z","closed_at":null,"body":"Hi, I use angular as my project's frontend framework. I want to use `gulp-angular-templatecache` to package my views into a JS file. However, I do not know how to inject the JS file in the pipe flow.\r\n\r\nHere is my HTML markup\r\n\r\n```html\r\n    <!-- build:js scripts/scripts.js -->\r\n    <script type=\"text/javascript\" src=\"scripts/app.js\"></script>\r\n    <!-- endbuild -->\r\n```\r\n\r\nHere is my gulp file's code\r\n\r\n```js\r\ngulp.task('build', ['scss'], function() {\r\n    var templatecacheStream = gulp.src(yeoman.app + '/views/**/*.html')\r\n        .pipe($.angularTemplatecache());\r\n\r\n    var jsFilter = $.filter('**/*.js');\r\n    var cssFilter = $.filter('**/*.css');\r\n\r\n    var assets = $.useref.assets({\r\n        searchPath: [yeoman.app],\r\n        additionalStreams: [templatecacheStream]\r\n    });\r\n\r\n    return gulp.src(paths.views.main)\r\n        .pipe(assets)\r\n        .pipe(jsFilter)\r\n        .pipe($.ngAnnotate())\r\n        .pipe($.uglify())\r\n        .pipe(jsFilter.restore())\r\n        .pipe(cssFilter)\r\n        .pipe($.minifyCss({ cache: true }))\r\n        .pipe(cssFilter.restore())\r\n        .pipe($.rev())\r\n        .pipe(assets.restore())\r\n        .pipe($.revReplace())\r\n        .pipe($.useref())\r\n        .pipe(gulp.dest(yeoman.dist));\r\n});\r\n```\r\n\r\nIt seems that the `additionalStreams` is not work. Do I miss or misunderstand something?"},"comment":{"url":"https://api.github.com/repos/jonkemp/gulp-useref/issues/comments/155077172","html_url":"https://github.com/jonkemp/gulp-useref/issues/144#issuecomment-155077172","issue_url":"https://api.github.com/repos/jonkemp/gulp-useref/issues/144","id":155077172,"user":{"login":"jonkemp","id":230683,"avatar_url":"https://avatars.githubusercontent.com/u/230683?v=3","gravatar_id":"","url":"https://api.github.com/users/jonkemp","html_url":"https://github.com/jonkemp","followers_url":"https://api.github.com/users/jonkemp/followers","following_url":"https://api.github.com/users/jonkemp/following{/other_user}","gists_url":"https://api.github.com/users/jonkemp/gists{/gist_id}","starred_url":"https://api.github.com/users/jonkemp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonkemp/subscriptions","organizations_url":"https://api.github.com/users/jonkemp/orgs","repos_url":"https://api.github.com/users/jonkemp/repos","events_url":"https://api.github.com/users/jonkemp/events{/privacy}","received_events_url":"https://api.github.com/users/jonkemp/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T14:22:38Z","updated_at":"2015-11-09T14:22:38Z","body":"@lisposter any code examples you can post are helpful."}}