{"action":"created","issue":{"url":"https://api.github.com/repos/Tahi-project/tahi/issues/888","labels_url":"https://api.github.com/repos/Tahi-project/tahi/issues/888/labels{/name}","comments_url":"https://api.github.com/repos/Tahi-project/tahi/issues/888/comments","events_url":"https://api.github.com/repos/Tahi-project/tahi/issues/888/events","html_url":"https://github.com/Tahi-project/tahi/issues/888","id":60614193,"number":888,"title":"RFC: conventions for packaging cards","user":{"login":"mikem","id":62569,"avatar_url":"https://avatars.githubusercontent.com/u/62569?v=3","gravatar_id":"","url":"https://api.github.com/users/mikem","html_url":"https://github.com/mikem","followers_url":"https://api.github.com/users/mikem/followers","following_url":"https://api.github.com/users/mikem/following{/other_user}","gists_url":"https://api.github.com/users/mikem/gists{/gist_id}","starred_url":"https://api.github.com/users/mikem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikem/subscriptions","organizations_url":"https://api.github.com/users/mikem/orgs","repos_url":"https://api.github.com/users/mikem/repos","events_url":"https://api.github.com/users/mikem/events{/privacy}","received_events_url":"https://api.github.com/users/mikem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-11T05:53:03Z","updated_at":"2015-03-13T04:12:08Z","closed_at":null,"body":"In order to make the experience of working with cards smoother for developers, we propose to bundle the Ember code together with the Rails engine code in the same repository. The Ember code will live in a `client` directory off the engine's root. So, the tree will look as follows:\r\n\r\n```\r\n$ tree\r\n.\r\n├── ...\r\n├── client\r\n│   ├── app\r\n│   │   ├── ...\r\n│   ├── index.js\r\n│   └── package.json\r\n├── ...\r\n├── my_custom_card.gemspec\r\n```\r\n\r\nOur card generator will need to be modified to create the boilerplate code organized this way.\r\n\r\nOur workflow for adding cards packaged this way can be automated. Much of this automation already exists in [the custom cards Rake task](https://github.com/Tahi-project/tahi/blob/56e216893fad07624b90103029fa6b8c27100dab/lib/tasks/custom_cards.rake).\r\n\r\nThe `install` task adds the custom card's entries in routes and CSS manifest, while the `install_engine` task adds the entries to `Gemfile` and `client/package.json`. The Ember code is installed as an addon, which means that changes to files are detected on save and visible without restarting anything in development.\r\n\r\nThoughts and comments welcome.\r\n\r\n---\r\n\r\n@egh's [example_tahi_engine](https://github.com/egh/example-tahi-engine) is an example of a card organized this way.\r\n\r\nThis should address #861 and #880."},"comment":{"url":"https://api.github.com/repos/Tahi-project/tahi/issues/comments/78788919","html_url":"https://github.com/Tahi-project/tahi/issues/888#issuecomment-78788919","issue_url":"https://api.github.com/repos/Tahi-project/tahi/issues/888","id":78788919,"user":{"login":"mikem","id":62569,"avatar_url":"https://avatars.githubusercontent.com/u/62569?v=3","gravatar_id":"","url":"https://api.github.com/users/mikem","html_url":"https://github.com/mikem","followers_url":"https://api.github.com/users/mikem/followers","following_url":"https://api.github.com/users/mikem/following{/other_user}","gists_url":"https://api.github.com/users/mikem/gists{/gist_id}","starred_url":"https://api.github.com/users/mikem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikem/subscriptions","organizations_url":"https://api.github.com/users/mikem/orgs","repos_url":"https://api.github.com/users/mikem/repos","events_url":"https://api.github.com/users/mikem/events{/privacy}","received_events_url":"https://api.github.com/users/mikem/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T04:12:08Z","updated_at":"2015-03-13T04:12:08Z","body":"@egh how about calling it an engine instead of a plugin?\r\n\r\nI like the suggested commands, makes sense to me. `rails generate tahi-task` will also need the name of the engine (or plugin) in which to place the card."}}