{"action":"created","issue":{"url":"https://api.github.com/repos/fatcerberus/minisphere/issues/110","repository_url":"https://api.github.com/repos/fatcerberus/minisphere","labels_url":"https://api.github.com/repos/fatcerberus/minisphere/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/fatcerberus/minisphere/issues/110/comments","events_url":"https://api.github.com/repos/fatcerberus/minisphere/issues/110/events","html_url":"https://github.com/fatcerberus/minisphere/issues/110","id":201387186,"number":110,"title":"Preserve source directory structure for chained targets","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"labels":[{"id":170243559,"url":"https://api.github.com/repos/fatcerberus/minisphere/labels/bug","name":"bug","color":"fc2929","default":true},{"id":360371063,"url":"https://api.github.com/repos/fatcerberus/minisphere/labels/Cell","name":"Cell","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/fatcerberus/minisphere/milestones/34","html_url":"https://github.com/fatcerberus/minisphere/milestone/34","labels_url":"https://api.github.com/repos/fatcerberus/minisphere/milestones/34/labels","id":2237947,"number":34,"title":"v4.4.0","description":null,"creator":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":10,"state":"open","created_at":"2017-01-09T17:23:16Z","updated_at":"2017-01-23T06:44:12Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2017-01-17T19:49:21Z","updated_at":"2017-01-23T06:48:18Z","closed_at":null,"body":"Currently in master, the following Cellscript loses subdirectories:\r\n```js\r\nconst transpile = require('transpile');\r\nconst minify = require('minify');\r\nvar sourceFiles = files('src/*.js', true);\r\nvar scripts = transpile('.tmp/', sourceFiles);\r\nminify('@/scripts/', scripts);\r\n```\r\n\r\nThe `minify()` step will produce a flat list of files in the output directory because the directory information is lost during the `transpile()` step.  Specifically, Target objects returned by `transpile()` don't contain any path information in their `.name` property, even if its sources do.  This should be fixed.\r\n\r\nFixing the bug will require a bit of refactoring to the API for targets.  `Target#name` may need to be made writable, for example."},"comment":{"url":"https://api.github.com/repos/fatcerberus/minisphere/issues/comments/274412475","html_url":"https://github.com/fatcerberus/minisphere/issues/110#issuecomment-274412475","issue_url":"https://api.github.com/repos/fatcerberus/minisphere/issues/110","id":274412475,"user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"created_at":"2017-01-23T06:48:18Z","updated_at":"2017-01-23T06:48:18Z","body":"This shouldn't be too hard to fix, I'll just have to come up with an API for it.  The main problem is that `Tool#stage()` uses only the filename as the `.name` of the returned Target, because there's nothing else sensible it can do (targets don't track which directory they were ultimately sourced from).\r\n\r\nIt might be worth just adding an `options` parameter to `Tool#stage`.  This way you'd pass it the target filename, an array of Targets for the sources, plus an optional options object containing, e.g. the Target `.name`.  I'll look into it tomorrow."}}
{"actor":{"display_login":"fatcerberus"}}