{"action":"created","issue":{"url":"https://api.github.com/repos/ORESoftware/requirejs-metagen/issues/1","repository_url":"https://api.github.com/repos/ORESoftware/requirejs-metagen","labels_url":"https://api.github.com/repos/ORESoftware/requirejs-metagen/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ORESoftware/requirejs-metagen/issues/1/comments","events_url":"https://api.github.com/repos/ORESoftware/requirejs-metagen/issues/1/events","html_url":"https://github.com/ORESoftware/requirejs-metagen/issues/1","id":165173489,"number":1,"title":"Nested paths as an object instead of strings with slashes","user":{"login":"daedalus28","id":1043503,"avatar_url":"https://avatars.githubusercontent.com/u/1043503?v=3","gravatar_id":"","url":"https://api.github.com/users/daedalus28","html_url":"https://github.com/daedalus28","followers_url":"https://api.github.com/users/daedalus28/followers","following_url":"https://api.github.com/users/daedalus28/following{/other_user}","gists_url":"https://api.github.com/users/daedalus28/gists{/gist_id}","starred_url":"https://api.github.com/users/daedalus28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daedalus28/subscriptions","organizations_url":"https://api.github.com/users/daedalus28/orgs","repos_url":"https://api.github.com/users/daedalus28/repos","events_url":"https://api.github.com/users/daedalus28/events{/privacy}","received_events_url":"https://api.github.com/users/daedalus28/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-07-12T20:31:19Z","updated_at":"2016-09-28T17:38:24Z","closed_at":null,"body":"Great work on this - I'm integrating this now into a project and it's going to save a ton of time over the manually created files we had before. With that said, it would be great if nested paths could be represented as an object instead of a string with slashes (behind a configuration flag or otherwise).\r\n\r\nRight now the output looks something like this\r\n```{\r\n    'a/b/c': arguments[0],\r\n    ...\r\n}```\r\n\r\nI'd like to be able to support behavior like the excellent node module `include-all` with something like this:\r\n\r\n```{\r\n    a: {\r\n        b: {\r\n            c: arguments[0]\r\n        }\r\n    }, ...\r\n}```\r\n\r\n\r\nFor now, I am just doing something like this to make it happen when I require in anything generated by this tool:\r\n```js\r\nvar objectifyPaths = function(pathsObject) {\r\n\treturn _.reduce(pathsObject, function(result, value, key) {\r\n\t\treturn _.set(result, key.replace(/\\//g, '.'), value);\r\n\t}, {});\r\n}\r\nvar all = require('./generatedFromMetagen');\r\nreturn objectifyPaths(all);\r\n```\r\n\r\nOf course, that assumes lodash as a dependency so I understand why you wouldn't want that in the generated output - that's why it'd be great if this tool could generate this kind of output without needing something at run time. If that's too complex, I'd at least like to see an extension point where it's either really easy for me to either swap out the template text or just be able to post process the generated js file. I was going to add support myself, but since your arguments can come from either the parameters object or as positional arguments, I wasn't sure how that would impact how you use this library."},"comment":{"url":"https://api.github.com/repos/ORESoftware/requirejs-metagen/issues/comments/250240610","html_url":"https://github.com/ORESoftware/requirejs-metagen/issues/1#issuecomment-250240610","issue_url":"https://api.github.com/repos/ORESoftware/requirejs-metagen/issues/1","id":250240610,"user":{"login":"the1mills","id":2148448,"avatar_url":"https://avatars.githubusercontent.com/u/2148448?v=3","gravatar_id":"","url":"https://api.github.com/users/the1mills","html_url":"https://github.com/the1mills","followers_url":"https://api.github.com/users/the1mills/followers","following_url":"https://api.github.com/users/the1mills/following{/other_user}","gists_url":"https://api.github.com/users/the1mills/gists{/gist_id}","starred_url":"https://api.github.com/users/the1mills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the1mills/subscriptions","organizations_url":"https://api.github.com/users/the1mills/orgs","repos_url":"https://api.github.com/users/the1mills/repos","events_url":"https://api.github.com/users/the1mills/events{/privacy}","received_events_url":"https://api.github.com/users/the1mills/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T17:38:24Z","updated_at":"2016-09-28T17:38:24Z","body":"Glad you liked the metagen name - for me it just stands for metadata-generator :)"}}
{"actor":{"display_login":"the1mills"}}