{"action":"closed","number":121,"pull_request":{"url":"https://api.github.com/repos/zont/gulp-usemin/pulls/121","id":35576008,"html_url":"https://github.com/zont/gulp-usemin/pull/121","diff_url":"https://github.com/zont/gulp-usemin/pull/121.diff","patch_url":"https://github.com/zont/gulp-usemin/pull/121.patch","issue_url":"https://api.github.com/repos/zont/gulp-usemin/issues/121","number":121,"state":"closed","locked":false,"title":"Restore outputRelativePath functionality","user":{"login":"dbow","id":589564,"avatar_url":"https://avatars.githubusercontent.com/u/589564?v=3","gravatar_id":"","url":"https://api.github.com/users/dbow","html_url":"https://github.com/dbow","followers_url":"https://api.github.com/users/dbow/followers","following_url":"https://api.github.com/users/dbow/following{/other_user}","gists_url":"https://api.github.com/users/dbow/gists{/gist_id}","starred_url":"https://api.github.com/users/dbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbow/subscriptions","organizations_url":"https://api.github.com/users/dbow/orgs","repos_url":"https://api.github.com/users/dbow/repos","events_url":"https://api.github.com/users/dbow/events{/privacy}","received_events_url":"https://api.github.com/users/dbow/received_events","type":"User","site_admin":false},"body":"Fix for https://github.com/zont/gulp-usemin/issues/95\r\n\r\nIt looks like the `outputRelativePath` option was removed in this commit: https://github.com/zont/gulp-usemin/commit/29e7ccc56dde98aff285ea367ab1518f7c8be284\r\n\r\nThe `createFile` function before:\r\n```\r\nfunction createFile(name, content) {\t\t\r\n  var filePath = path.join(path.relative(basePath, mainPath), name)\t\t\r\n  var isStatic = name.split('.').pop() === 'js' || name.split('.').pop() === 'css'\t\t\r\n\r\n  if (options.outputRelativePath && isStatic)\t\t\r\n    filePath = options.outputRelativePath + name;\t\t\r\n\r\n  return new gutil.File({\t\t\r\n    path: filePath,\t\t\r\n    contents: new Buffer(content)\t\t\r\n  })\t\t\r\n}\r\n```\r\nand after\r\n```\r\nfunction createFile(name, content) {\r\n  var filePath = path.join(path.relative(basePath, mainPath), name);\r\n  return new gutil.File({\r\n    path: filePath,\r\n    contents: new Buffer(content)\r\n  })\r\n}\r\n```\r\n\r\nI'm not familiar with the overall design/architecture here, but this was my best guess as to how to restore the functionality. The `createFile` function currently only handles the HTML templates/views, so re-adding the code there would not actually modify the output directory of the asset files.\r\n\r\nBased on the description of `outputRelativePath` (\"Relative location to html file for new concatenated js and css.\"), it seemed the best place for the value was in the `name` property of the blocks, which is passed as the first argument to `gulp-concat` [here](https://github.com/zont/gulp-usemin/blob/master/lib/pipeline.js#L3).\r\n\r\nIf someone who is familiar with the repo could take a look and review that'd be great! I could write some tests, though a lot of the tests were failing locally for me already so not sure how maintained the tests are? (or if that was some issue with my local setup).\r\n\r\nAlso, there is already a PR regarding `outputRelativePath` [here](https://github.com/zont/gulp-usemin/pull/80) but it modifies the old behavior before that refactor commit above. It looks like there were unanswered questions as to how exactly `outputRelativePath` should work that are probably worth addressing.","created_at":"2015-05-16T19:30:50Z","updated_at":"2015-08-26T16:24:58Z","closed_at":"2015-08-26T16:24:58Z","merged_at":"2015-08-26T16:24:58Z","merge_commit_sha":"fe7c7f8a4d2d2f8488ebf0a7d4f7b4bf251c01e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zont/gulp-usemin/pulls/121/commits","review_comments_url":"https://api.github.com/repos/zont/gulp-usemin/pulls/121/comments","review_comment_url":"https://api.github.com/repos/zont/gulp-usemin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zont/gulp-usemin/issues/121/comments","statuses_url":"https://api.github.com/repos/zont/gulp-usemin/statuses/dcce4fb5af36926fb591a04a2f1fd6f122e80b55","head":{"label":"dbow:master","ref":"master","sha":"dcce4fb5af36926fb591a04a2f1fd6f122e80b55","user":{"login":"dbow","id":589564,"avatar_url":"https://avatars.githubusercontent.com/u/589564?v=3","gravatar_id":"","url":"https://api.github.com/users/dbow","html_url":"https://github.com/dbow","followers_url":"https://api.github.com/users/dbow/followers","following_url":"https://api.github.com/users/dbow/following{/other_user}","gists_url":"https://api.github.com/users/dbow/gists{/gist_id}","starred_url":"https://api.github.com/users/dbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbow/subscriptions","organizations_url":"https://api.github.com/users/dbow/orgs","repos_url":"https://api.github.com/users/dbow/repos","events_url":"https://api.github.com/users/dbow/events{/privacy}","received_events_url":"https://api.github.com/users/dbow/received_events","type":"User","site_admin":false},"repo":{"id":35691086,"name":"gulp-usemin","full_name":"dbow/gulp-usemin","owner":{"login":"dbow","id":589564,"avatar_url":"https://avatars.githubusercontent.com/u/589564?v=3","gravatar_id":"","url":"https://api.github.com/users/dbow","html_url":"https://github.com/dbow","followers_url":"https://api.github.com/users/dbow/followers","following_url":"https://api.github.com/users/dbow/following{/other_user}","gists_url":"https://api.github.com/users/dbow/gists{/gist_id}","starred_url":"https://api.github.com/users/dbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbow/subscriptions","organizations_url":"https://api.github.com/users/dbow/orgs","repos_url":"https://api.github.com/users/dbow/repos","events_url":"https://api.github.com/users/dbow/events{/privacy}","received_events_url":"https://api.github.com/users/dbow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dbow/gulp-usemin","description":"","fork":true,"url":"https://api.github.com/repos/dbow/gulp-usemin","forks_url":"https://api.github.com/repos/dbow/gulp-usemin/forks","keys_url":"https://api.github.com/repos/dbow/gulp-usemin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dbow/gulp-usemin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dbow/gulp-usemin/teams","hooks_url":"https://api.github.com/repos/dbow/gulp-usemin/hooks","issue_events_url":"https://api.github.com/repos/dbow/gulp-usemin/issues/events{/number}","events_url":"https://api.github.com/repos/dbow/gulp-usemin/events","assignees_url":"https://api.github.com/repos/dbow/gulp-usemin/assignees{/user}","branches_url":"https://api.github.com/repos/dbow/gulp-usemin/branches{/branch}","tags_url":"https://api.github.com/repos/dbow/gulp-usemin/tags","blobs_url":"https://api.github.com/repos/dbow/gulp-usemin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dbow/gulp-usemin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dbow/gulp-usemin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dbow/gulp-usemin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dbow/gulp-usemin/statuses/{sha}","languages_url":"https://api.github.com/repos/dbow/gulp-usemin/languages","stargazers_url":"https://api.github.com/repos/dbow/gulp-usemin/stargazers","contributors_url":"https://api.github.com/repos/dbow/gulp-usemin/contributors","subscribers_url":"https://api.github.com/repos/dbow/gulp-usemin/subscribers","subscription_url":"https://api.github.com/repos/dbow/gulp-usemin/subscription","commits_url":"https://api.github.com/repos/dbow/gulp-usemin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dbow/gulp-usemin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dbow/gulp-usemin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dbow/gulp-usemin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dbow/gulp-usemin/contents/{+path}","compare_url":"https://api.github.com/repos/dbow/gulp-usemin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dbow/gulp-usemin/merges","archive_url":"https://api.github.com/repos/dbow/gulp-usemin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dbow/gulp-usemin/downloads","issues_url":"https://api.github.com/repos/dbow/gulp-usemin/issues{/number}","pulls_url":"https://api.github.com/repos/dbow/gulp-usemin/pulls{/number}","milestones_url":"https://api.github.com/repos/dbow/gulp-usemin/milestones{/number}","notifications_url":"https://api.github.com/repos/dbow/gulp-usemin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dbow/gulp-usemin/labels{/name}","releases_url":"https://api.github.com/repos/dbow/gulp-usemin/releases{/id}","created_at":"2015-05-15T18:52:58Z","updated_at":"2015-08-18T16:53:46Z","pushed_at":"2015-05-16T19:05:41Z","git_url":"git://github.com/dbow/gulp-usemin.git","ssh_url":"git@github.com:dbow/gulp-usemin.git","clone_url":"https://github.com/dbow/gulp-usemin.git","svn_url":"https://github.com/dbow/gulp-usemin","homepage":null,"size":185,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"zont:master","ref":"master","sha":"f52d6094d02644a9c42acd4da954754089756423","user":{"login":"zont","id":821305,"avatar_url":"https://avatars.githubusercontent.com/u/821305?v=3","gravatar_id":"","url":"https://api.github.com/users/zont","html_url":"https://github.com/zont","followers_url":"https://api.github.com/users/zont/followers","following_url":"https://api.github.com/users/zont/following{/other_user}","gists_url":"https://api.github.com/users/zont/gists{/gist_id}","starred_url":"https://api.github.com/users/zont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zont/subscriptions","organizations_url":"https://api.github.com/users/zont/orgs","repos_url":"https://api.github.com/users/zont/repos","events_url":"https://api.github.com/users/zont/events{/privacy}","received_events_url":"https://api.github.com/users/zont/received_events","type":"User","site_admin":false},"repo":{"id":15904600,"name":"gulp-usemin","full_name":"zont/gulp-usemin","owner":{"login":"zont","id":821305,"avatar_url":"https://avatars.githubusercontent.com/u/821305?v=3","gravatar_id":"","url":"https://api.github.com/users/zont","html_url":"https://github.com/zont","followers_url":"https://api.github.com/users/zont/followers","following_url":"https://api.github.com/users/zont/following{/other_user}","gists_url":"https://api.github.com/users/zont/gists{/gist_id}","starred_url":"https://api.github.com/users/zont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zont/subscriptions","organizations_url":"https://api.github.com/users/zont/orgs","repos_url":"https://api.github.com/users/zont/repos","events_url":"https://api.github.com/users/zont/events{/privacy}","received_events_url":"https://api.github.com/users/zont/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zont/gulp-usemin","description":"","fork":false,"url":"https://api.github.com/repos/zont/gulp-usemin","forks_url":"https://api.github.com/repos/zont/gulp-usemin/forks","keys_url":"https://api.github.com/repos/zont/gulp-usemin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zont/gulp-usemin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zont/gulp-usemin/teams","hooks_url":"https://api.github.com/repos/zont/gulp-usemin/hooks","issue_events_url":"https://api.github.com/repos/zont/gulp-usemin/issues/events{/number}","events_url":"https://api.github.com/repos/zont/gulp-usemin/events","assignees_url":"https://api.github.com/repos/zont/gulp-usemin/assignees{/user}","branches_url":"https://api.github.com/repos/zont/gulp-usemin/branches{/branch}","tags_url":"https://api.github.com/repos/zont/gulp-usemin/tags","blobs_url":"https://api.github.com/repos/zont/gulp-usemin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zont/gulp-usemin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zont/gulp-usemin/git/refs{/sha}","trees_url":"https://api.github.com/repos/zont/gulp-usemin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zont/gulp-usemin/statuses/{sha}","languages_url":"https://api.github.com/repos/zont/gulp-usemin/languages","stargazers_url":"https://api.github.com/repos/zont/gulp-usemin/stargazers","contributors_url":"https://api.github.com/repos/zont/gulp-usemin/contributors","subscribers_url":"https://api.github.com/repos/zont/gulp-usemin/subscribers","subscription_url":"https://api.github.com/repos/zont/gulp-usemin/subscription","commits_url":"https://api.github.com/repos/zont/gulp-usemin/commits{/sha}","git_commits_url":"https://api.github.com/repos/zont/gulp-usemin/git/commits{/sha}","comments_url":"https://api.github.com/repos/zont/gulp-usemin/comments{/number}","issue_comment_url":"https://api.github.com/repos/zont/gulp-usemin/issues/comments{/number}","contents_url":"https://api.github.com/repos/zont/gulp-usemin/contents/{+path}","compare_url":"https://api.github.com/repos/zont/gulp-usemin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zont/gulp-usemin/merges","archive_url":"https://api.github.com/repos/zont/gulp-usemin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zont/gulp-usemin/downloads","issues_url":"https://api.github.com/repos/zont/gulp-usemin/issues{/number}","pulls_url":"https://api.github.com/repos/zont/gulp-usemin/pulls{/number}","milestones_url":"https://api.github.com/repos/zont/gulp-usemin/milestones{/number}","notifications_url":"https://api.github.com/repos/zont/gulp-usemin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zont/gulp-usemin/labels{/name}","releases_url":"https://api.github.com/repos/zont/gulp-usemin/releases{/id}","created_at":"2014-01-14T14:37:41Z","updated_at":"2015-08-24T09:37:04Z","pushed_at":"2015-08-26T16:24:58Z","git_url":"git://github.com/zont/gulp-usemin.git","ssh_url":"git@github.com:zont/gulp-usemin.git","clone_url":"https://github.com/zont/gulp-usemin.git","svn_url":"https://github.com/zont/gulp-usemin","homepage":null,"size":656,"stargazers_count":208,"watchers_count":208,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":43,"forks":79,"open_issues":43,"watchers":208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zont/gulp-usemin/pulls/121"},"html":{"href":"https://github.com/zont/gulp-usemin/pull/121"},"issue":{"href":"https://api.github.com/repos/zont/gulp-usemin/issues/121"},"comments":{"href":"https://api.github.com/repos/zont/gulp-usemin/issues/121/comments"},"review_comments":{"href":"https://api.github.com/repos/zont/gulp-usemin/pulls/121/comments"},"review_comment":{"href":"https://api.github.com/repos/zont/gulp-usemin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zont/gulp-usemin/pulls/121/commits"},"statuses":{"href":"https://api.github.com/repos/zont/gulp-usemin/statuses/dcce4fb5af36926fb591a04a2f1fd6f122e80b55"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"zont","id":821305,"avatar_url":"https://avatars.githubusercontent.com/u/821305?v=3","gravatar_id":"","url":"https://api.github.com/users/zont","html_url":"https://github.com/zont","followers_url":"https://api.github.com/users/zont/followers","following_url":"https://api.github.com/users/zont/following{/other_user}","gists_url":"https://api.github.com/users/zont/gists{/gist_id}","starred_url":"https://api.github.com/users/zont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zont/subscriptions","organizations_url":"https://api.github.com/users/zont/orgs","repos_url":"https://api.github.com/users/zont/repos","events_url":"https://api.github.com/users/zont/events{/privacy}","received_events_url":"https://api.github.com/users/zont/received_events","type":"User","site_admin":false},"comments":4,"review_comments":0,"commits":1,"additions":3,"deletions":2,"changed_files":1}}