{"action":"created","issue":{"url":"https://api.github.com/repos/ColdBox/coldbox-platform/issues/266","repository_url":"https://api.github.com/repos/ColdBox/coldbox-platform","labels_url":"https://api.github.com/repos/ColdBox/coldbox-platform/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/ColdBox/coldbox-platform/issues/266/comments","events_url":"https://api.github.com/repos/ColdBox/coldbox-platform/issues/266/events","html_url":"https://github.com/ColdBox/coldbox-platform/pull/266","id":151448570,"number":266,"title":"Elixir function for versioned assets","user":{"login":"elpete","id":2583646,"avatar_url":"https://avatars.githubusercontent.com/u/2583646?v=3","gravatar_id":"","url":"https://api.github.com/users/elpete","html_url":"https://github.com/elpete","followers_url":"https://api.github.com/users/elpete/followers","following_url":"https://api.github.com/users/elpete/following{/other_user}","gists_url":"https://api.github.com/users/elpete/gists{/gist_id}","starred_url":"https://api.github.com/users/elpete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elpete/subscriptions","organizations_url":"https://api.github.com/users/elpete/orgs","repos_url":"https://api.github.com/users/elpete/repos","events_url":"https://api.github.com/users/elpete/events{/privacy}","received_events_url":"https://api.github.com/users/elpete/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-27T17:50:06Z","updated_at":"2016-04-27T22:39:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ColdBox/coldbox-platform/pulls/266","html_url":"https://github.com/ColdBox/coldbox-platform/pull/266","diff_url":"https://github.com/ColdBox/coldbox-platform/pull/266.diff","patch_url":"https://github.com/ColdBox/coldbox-platform/pull/266.patch"},"body":"New elixir function that returns the versioned path for a file.\r\n\r\nThis allows us to cache bust and version using ColdBox Elixir.\r\n```cfm\r\n<script src=\"#elixir( 'js/all.js' )#\"></script>\r\n// =>\r\n<script src=\"/includes/build/js/all-dd0e0acd94.js\"></script>\r\n```\r\n\r\nIf we can't find the versioned path, we return the normal convention path.\r\n```cfm\r\n<script src=\"#elixir( 'css/all.css' )#\"></script>\r\n// =>\r\n<script src=\"/includes/css/all.css\"></script>\r\n```\r\n\r\nThe `appMapping` is also taken into account if there is one:\r\n```cfm\r\n// appMapping = \"/testapp\"\r\n<script src=\"#elixir( 'js/all.js' )#\"></script>\r\n// =>\r\n<script src=\"/testapp/includes/build/js/all-dd0e0acd94.js\"></script>\r\n```\r\n\r\n---\r\n\r\nThis pull request also introduces a new configurable `includesLocation` option.\r\n\r\n`includesConvention` can be overwritten in the ColdBox.cfc config file in the conventions struct along with the other ColdBox conventions by specifying an `includesLocation` key.\r\n\r\nThe only place using the `includesConvention` so far is this new function, but it is available any where using the standard `controller.getSetting( \"includesConvention\", true )` call."},"comment":{"url":"https://api.github.com/repos/ColdBox/coldbox-platform/issues/comments/215252839","html_url":"https://github.com/ColdBox/coldbox-platform/pull/266#issuecomment-215252839","issue_url":"https://api.github.com/repos/ColdBox/coldbox-platform/issues/266","id":215252839,"user":{"login":"lmajano","id":137111,"avatar_url":"https://avatars.githubusercontent.com/u/137111?v=3","gravatar_id":"","url":"https://api.github.com/users/lmajano","html_url":"https://github.com/lmajano","followers_url":"https://api.github.com/users/lmajano/followers","following_url":"https://api.github.com/users/lmajano/following{/other_user}","gists_url":"https://api.github.com/users/lmajano/gists{/gist_id}","starred_url":"https://api.github.com/users/lmajano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmajano/subscriptions","organizations_url":"https://api.github.com/users/lmajano/orgs","repos_url":"https://api.github.com/users/lmajano/repos","events_url":"https://api.github.com/users/lmajano/events{/privacy}","received_events_url":"https://api.github.com/users/lmajano/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T22:39:01Z","updated_at":"2016-04-27T22:39:01Z","body":"@elpete I will add comments inline. However, I think the best place for the function is in the `HTMLHelper` class and not in the renderer.\r\n\r\n`html.elixir()`\r\n\r\nThis way we can add more convention things in the html helper which does already `addAsset()` and others."}}