{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/3313","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/3313/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/3313/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/3313/events","html_url":"https://github.com/ember-cli/ember-cli/issues/3313","id":58100728,"number":3313,"title":"Getting addon assets (esp. images) into dist/assets","user":{"login":"wsewell","id":342605,"avatar_url":"https://avatars.githubusercontent.com/u/342605?v=3","gravatar_id":"","url":"https://api.github.com/users/wsewell","html_url":"https://github.com/wsewell","followers_url":"https://api.github.com/users/wsewell/followers","following_url":"https://api.github.com/users/wsewell/following{/other_user}","gists_url":"https://api.github.com/users/wsewell/gists{/gist_id}","starred_url":"https://api.github.com/users/wsewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsewell/subscriptions","organizations_url":"https://api.github.com/users/wsewell/orgs","repos_url":"https://api.github.com/users/wsewell/repos","events_url":"https://api.github.com/users/wsewell/events{/privacy}","received_events_url":"https://api.github.com/users/wsewell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ember-cli/ember-cli/labels/addons","name":"addons","color":"bada55"},{"url":"https://api.github.com/repos/ember-cli/ember-cli/labels/needs-investigation","name":"needs-investigation","color":"fad8c7"},{"url":"https://api.github.com/repos/ember-cli/ember-cli/labels/packager","name":"packager","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-18T17:37:42Z","updated_at":"2015-02-24T00:49:44Z","closed_at":null,"body":"The current setup puts anything from an addon's `public` directory into, eg, `dist/my-addon-name`. This is inconvenient when trying to reference images from the addon's CSS files. And completely breaks for ember-cli-rails and other home-grown solutions that only deploy the `assets` directory.\r\n\r\nIs there a planned solution to getting files (at least images) into `dist/assets`? Perhaps by changing the location of the addon's public files or using `app/images` or perhaps `addon/images`?\r\n\r\nInternally we are hoisting `dist/my-addon-name` to `dist/assets/my-addon-name` by monkey-patching Addon.prototype.treeForPublic. This is a pretty straightforward change that I can submit as a PR but I don't know the history of the decision for the current location.\r\n\r\n```\r\nAddon.prototype.treeForPublic = function(tree) {\r\n  this._requireBuildPackages();\r\n\r\n  if (!tree) {\r\n    return tree;\r\n  }\r\n\r\n  return this.pickFiles(tree, {\r\n    srcDir: '/',\r\n    destDir: 'assets/' + this.moduleName()\r\n  });\r\n};\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/comments/75676056","html_url":"https://github.com/ember-cli/ember-cli/issues/3313#issuecomment-75676056","issue_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/3313","id":75676056,"user":{"login":"rwjblue","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?v=3","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":"2015-02-24T00:49:44Z","updated_at":"2015-02-24T00:49:44Z","body":"@stefanpenner - I do not want to make any more nested trees (`styles` and `templates` nested under `app/` for example), since they make much more work to strip them out during the build.  I would be ok with another root level dir for `addon-public` or something..."}}