{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/8000","repository_url":"https://api.github.com/repos/ember-cli/ember-cli","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/8000/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/8000/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/8000/events","html_url":"https://github.com/ember-cli/ember-cli/pull/8000","id":354920065,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNTcwOTEy","number":8000,"title":"WIP - Adding `--in` option for customizing path for in repo addon blueprints","user":{"login":"scalvert","id":180990,"node_id":"MDQ6VXNlcjE4MDk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/180990?v=4","gravatar_id":"","url":"https://api.github.com/users/scalvert","html_url":"https://github.com/scalvert","followers_url":"https://api.github.com/users/scalvert/followers","following_url":"https://api.github.com/users/scalvert/following{/other_user}","gists_url":"https://api.github.com/users/scalvert/gists{/gist_id}","starred_url":"https://api.github.com/users/scalvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalvert/subscriptions","organizations_url":"https://api.github.com/users/scalvert/orgs","repos_url":"https://api.github.com/users/scalvert/repos","events_url":"https://api.github.com/users/scalvert/events{/privacy}","received_events_url":"https://api.github.com/users/scalvert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-28T21:59:59Z","updated_at":"2018-09-05T13:57:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ember-cli/ember-cli/pulls/8000","html_url":"https://github.com/ember-cli/ember-cli/pull/8000","diff_url":"https://github.com/ember-cli/ember-cli/pull/8000.diff","patch_url":"https://github.com/ember-cli/ember-cli/pull/8000.patch"},"body":"Ember generate allows you to generate entities inside in-repo addons using the `--in-repo-addon` option (not to be confused with the `ember generate` `in-repo-addon` subcommand, which creates an in-repo addon). This option only partially accounts for custom directories (following [this PR](https://github.com/ember-cli/ember-cli/pull/7947)), which is a requirement in some larger applications. \r\n\r\nThis PR proposes removing `--in-repo-addon` in favor of a new option: `--in`. The `--in` option differs from the existing `--in-repo-addon` option as it takes a path pointing to the root of the **addon** you would like your blueprint run against.\r\n\r\nValid use cases for the `--in` option would be:\r\n\r\n\r\n### Case 1\r\n\r\nProjects contained in a subdirectory of the root of the repository (monorepos):\r\n\r\n```\r\nember generate component foo-bar --in ./subproject/baz\r\n```\r\n\r\n**Result**: \r\nWill create component files in:\r\n\r\n```\r\n// component blueprint \r\nsubproject/baz/app/components/foo-bar.js\r\nsubproject/baz/app/templates/components/foo-bar.hbs\r\n    \r\n// component-test blueprint\r\nsubproject/tests/integration/components/foo-bar-test.js\r\n```\r\n\r\n### Case 2\r\n\r\nStandard in repo addons (contained in lib):\r\n\r\n```\r\nember generate component foo-bar --in ./lib/baz\r\n```\r\n\r\n**Result**: \r\nWill create component files in:\r\n\r\n```\r\n// component blueprint\r\nlib/baz/addon/components/foo-bar.js\r\nlib/baz/addon/templates/components/foo-bar.hbs\r\n    \r\n// component-test blueprint\r\ntests/integration/components/foo-bar-test.js\r\n```\r\n\r\n### Case 3\r\n\r\nIn repo addon in custom root level path:\r\n\r\n```\r\nember generate component foo-bar --in ./custom/baz\r\n```\r\n\r\n**Result**: \r\nWill create component files in:\r\n\r\n```\r\n// component blueprint\r\ncustom/baz/addon/components/foo-bar.js\r\ncustom/baz/addon/templates/components/foo-bar.hbs\r\n    \r\n// component-test blueprint\r\ntests/integration/components/foo-bar-test.js\r\n```\r\n\r\n### Case 4\r\n\r\nIn repo addon in custom nested path:\r\n\r\n```\r\nember generate component foo-bar --in ./custom/sub/baz\r\n```\r\n\r\n**Result**: \r\nWill create component files in:\r\n\r\n```\r\n// component blueprint\r\ncustom/sub/baz/addon/components/foo-bar.js\r\ncustom/sub/baz/addon/templates/components/foo-bar.hbs\r\n    \r\n// component-test blueprint\r\ntests/integration/components/foo-bar-test.js\r\n```\r\n\r\n### Deprecation\r\n\r\nDeprecating the old `--in-repo-addon` option should be done via the following:\r\n\r\n- add a deprecation warning when using the `--in-repo-addon` option\r\n- deprecate at next LTS version of ember-cli\r\n"},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/comments/418740743","html_url":"https://github.com/ember-cli/ember-cli/pull/8000#issuecomment-418740743","issue_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/8000","id":418740743,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODc0MDc0Mw==","user":{"login":"rwjblue","id":12637,"node_id":"MDQ6VXNlcjEyNjM3","avatar_url":"https://avatars0.githubusercontent.com/u/12637?v=4","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T13:57:52Z","updated_at":"2018-09-05T13:57:52Z","author_association":"CONTRIBUTOR","body":"@trabus - Thanks for reviewing! FWIW, this doesn't remove `--in-repo-addon` / `--ir` (it just adds `--in`), I totally agree that (at a later time) we should make `--in-repo-addon` leverage `--in` internally..."}}
{"actor":{"display_login":"rwjblue"}}