{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/706","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/706/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/706/comments","events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/706/events","html_url":"https://github.com/NativeScript/NativeScript/pull/706","id":105775118,"number":706,"title":"CSS and XML code files now can be specified in XML","user":{"login":"enchev","id":5804953,"avatar_url":"https://avatars.githubusercontent.com/u/5804953?v=3","gravatar_id":"","url":"https://api.github.com/users/enchev","html_url":"https://github.com/enchev","followers_url":"https://api.github.com/users/enchev/followers","following_url":"https://api.github.com/users/enchev/following{/other_user}","gists_url":"https://api.github.com/users/enchev/gists{/gist_id}","starred_url":"https://api.github.com/users/enchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enchev/subscriptions","organizations_url":"https://api.github.com/users/enchev/orgs","repos_url":"https://api.github.com/users/enchev/repos","events_url":"https://api.github.com/users/enchev/events{/privacy}","received_events_url":"https://api.github.com/users/enchev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NativeScript/NativeScript/labels/cla:%20yes","name":"cla: yes","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-10T10:03:45Z","updated_at":"2015-09-10T10:36:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/706","html_url":"https://github.com/NativeScript/NativeScript/pull/706","diff_url":"https://github.com/NativeScript/NativeScript/pull/706.diff","patch_url":"https://github.com/NativeScript/NativeScript/pull/706.patch"},"body":"Implemented #675\r\n\r\nExample:\r\n#### XML\r\n```XML\r\n<Page codeFile=\"~/custom-code-file\"\r\n           cssFile=\"~/custom-css-file.css\" loaded=\"loaded\">\r\n  <Label cssClass='MyClass' />\r\n</Page>\r\n```\r\n#### Code\r\n```TypeScript\r\nexport function loaded(args) {\r\n    console.log(\"Custom code file loaded!\")\r\n}\r\n```\r\n#### CSS\r\n```CSS\r\n.MyClass {\r\n    background-color: green;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments/139200777","html_url":"https://github.com/NativeScript/NativeScript/pull/706#issuecomment-139200777","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/706","id":139200777,"user":{"login":"hshristov","id":5966717,"avatar_url":"https://avatars.githubusercontent.com/u/5966717?v=3","gravatar_id":"","url":"https://api.github.com/users/hshristov","html_url":"https://github.com/hshristov","followers_url":"https://api.github.com/users/hshristov/followers","following_url":"https://api.github.com/users/hshristov/following{/other_user}","gists_url":"https://api.github.com/users/hshristov/gists{/gist_id}","starred_url":"https://api.github.com/users/hshristov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hshristov/subscriptions","organizations_url":"https://api.github.com/users/hshristov/orgs","repos_url":"https://api.github.com/users/hshristov/repos","events_url":"https://api.github.com/users/hshristov/events{/privacy}","received_events_url":"https://api.github.com/users/hshristov/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T10:36:49Z","updated_at":"2015-09-10T10:36:49Z","body":":+1: \r\nIt will be even better if we can move the 'implicit require' (the one that happens before calling component-builder) inside the component builder and don't require it if there is explicit 'codeFile' attribute set. "}}