{"action":"created","comment":{"url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/comments/53198713","id":53198713,"diff_hunk":"@@ -152,6 +152,26 @@ class HotReloader extends Emitter {\n     const self = this\n     const start = new Date().getTime()\n \n+    if (moduleName.endsWith('.html')) {\n+      let moduleImportName = System.normalizeSync(moduleName + '!text')\n+      let module = System.loads[moduleImportName]\n+      let parentModuleName\n+      if (module && module.importers && module.importers.length) {\n+        parentModuleName = System.loads[moduleImportName].importers[0].name","path":"hot-reloader.js","position":9,"original_position":9,"commit_id":"d609175edf192732edf3b84a35deafb13e2466e1","original_commit_id":"d609175edf192732edf3b84a35deafb13e2466e1","user":{"login":"JordanBelford","id":1946538,"avatar_url":"https://avatars.githubusercontent.com/u/1946538?v=3","gravatar_id":"","url":"https://api.github.com/users/JordanBelford","html_url":"https://github.com/JordanBelford","followers_url":"https://api.github.com/users/JordanBelford/followers","following_url":"https://api.github.com/users/JordanBelford/following{/other_user}","gists_url":"https://api.github.com/users/JordanBelford/gists{/gist_id}","starred_url":"https://api.github.com/users/JordanBelford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordanBelford/subscriptions","organizations_url":"https://api.github.com/users/JordanBelford/orgs","repos_url":"https://api.github.com/users/JordanBelford/repos","events_url":"https://api.github.com/users/JordanBelford/events{/privacy}","received_events_url":"https://api.github.com/users/JordanBelford/received_events","type":"User","site_admin":false},"body":"@capaj I agree. I will try to implement multiple importers today.","created_at":"2016-02-17T17:22:58Z","updated_at":"2016-02-17T17:22:58Z","html_url":"https://github.com/capaj/systemjs-hot-reloader/pull/54#discussion_r53198713","pull_request_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/comments/53198713"},"html":{"href":"https://github.com/capaj/systemjs-hot-reloader/pull/54#discussion_r53198713"},"pull_request":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/54","id":59250992,"html_url":"https://github.com/capaj/systemjs-hot-reloader/pull/54","diff_url":"https://github.com/capaj/systemjs-hot-reloader/pull/54.diff","patch_url":"https://github.com/capaj/systemjs-hot-reloader/pull/54.patch","issue_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/issues/54","number":54,"state":"closed","locked":false,"title":"Html reload","user":{"login":"JordanBelford","id":1946538,"avatar_url":"https://avatars.githubusercontent.com/u/1946538?v=3","gravatar_id":"","url":"https://api.github.com/users/JordanBelford","html_url":"https://github.com/JordanBelford","followers_url":"https://api.github.com/users/JordanBelford/followers","following_url":"https://api.github.com/users/JordanBelford/following{/other_user}","gists_url":"https://api.github.com/users/JordanBelford/gists{/gist_id}","starred_url":"https://api.github.com/users/JordanBelford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordanBelford/subscriptions","organizations_url":"https://api.github.com/users/JordanBelford/orgs","repos_url":"https://api.github.com/users/JordanBelford/repos","events_url":"https://api.github.com/users/JordanBelford/events{/privacy}","received_events_url":"https://api.github.com/users/JordanBelford/received_events","type":"User","site_admin":false},"body":"I implemented basic html reloading that is working well for my project. Load times went from 10-15 seconds to about 3 seconds.\r\n\r\nIt uses System.loads to find the module that imported the html file, and then hot reloads that parent module. \r\n\r\nI welcome any feedback about the implementation, as I am not very familiar with this project or SystemJS's internals. \r\n\r\nOne thing to note, if there are multiple 'importers' of the html file, it should probably hot reload all of them. Currently this is only reloading the first one.\r\n\r\nI am using browsersync, which injects css files, so combined with this project, hot reloading html, css, and js are all working.\r\n\r\n#50","created_at":"2016-02-13T00:37:40Z","updated_at":"2016-02-17T17:22:58Z","closed_at":"2016-02-16T15:26:40Z","merged_at":"2016-02-16T15:26:40Z","merge_commit_sha":"38ca77850edce419afe49c3b89409559495cc082","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/54/commits","review_comments_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/54/comments","review_comment_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/comments{/number}","comments_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/issues/54/comments","statuses_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/statuses/d609175edf192732edf3b84a35deafb13e2466e1","head":{"label":"JordanBelford:html-reload-merge","ref":"html-reload-merge","sha":"d609175edf192732edf3b84a35deafb13e2466e1","user":{"login":"JordanBelford","id":1946538,"avatar_url":"https://avatars.githubusercontent.com/u/1946538?v=3","gravatar_id":"","url":"https://api.github.com/users/JordanBelford","html_url":"https://github.com/JordanBelford","followers_url":"https://api.github.com/users/JordanBelford/followers","following_url":"https://api.github.com/users/JordanBelford/following{/other_user}","gists_url":"https://api.github.com/users/JordanBelford/gists{/gist_id}","starred_url":"https://api.github.com/users/JordanBelford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordanBelford/subscriptions","organizations_url":"https://api.github.com/users/JordanBelford/orgs","repos_url":"https://api.github.com/users/JordanBelford/repos","events_url":"https://api.github.com/users/JordanBelford/events{/privacy}","received_events_url":"https://api.github.com/users/JordanBelford/received_events","type":"User","site_admin":false},"repo":{"id":51005612,"name":"systemjs-hot-reloader","full_name":"JordanBelford/systemjs-hot-reloader","owner":{"login":"JordanBelford","id":1946538,"avatar_url":"https://avatars.githubusercontent.com/u/1946538?v=3","gravatar_id":"","url":"https://api.github.com/users/JordanBelford","html_url":"https://github.com/JordanBelford","followers_url":"https://api.github.com/users/JordanBelford/followers","following_url":"https://api.github.com/users/JordanBelford/following{/other_user}","gists_url":"https://api.github.com/users/JordanBelford/gists{/gist_id}","starred_url":"https://api.github.com/users/JordanBelford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordanBelford/subscriptions","organizations_url":"https://api.github.com/users/JordanBelford/orgs","repos_url":"https://api.github.com/users/JordanBelford/repos","events_url":"https://api.github.com/users/JordanBelford/events{/privacy}","received_events_url":"https://api.github.com/users/JordanBelford/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JordanBelford/systemjs-hot-reloader","description":"reloads your modules as needed so that you can have satisfyingly fast feedback loop when developing your app","fork":true,"url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader","forks_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/forks","keys_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/teams","hooks_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/hooks","issue_events_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/issues/events{/number}","events_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/events","assignees_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/assignees{/user}","branches_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/branches{/branch}","tags_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/tags","blobs_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/git/refs{/sha}","trees_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/statuses/{sha}","languages_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/languages","stargazers_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/stargazers","contributors_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/contributors","subscribers_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/subscribers","subscription_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/subscription","commits_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/commits{/sha}","git_commits_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/git/commits{/sha}","comments_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/comments{/number}","issue_comment_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/issues/comments{/number}","contents_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/contents/{+path}","compare_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/merges","archive_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/downloads","issues_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/issues{/number}","pulls_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/pulls{/number}","milestones_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/milestones{/number}","notifications_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/labels{/name}","releases_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/releases{/id}","deployments_url":"https://api.github.com/repos/JordanBelford/systemjs-hot-reloader/deployments","created_at":"2016-02-03T14:39:49Z","updated_at":"2016-02-03T14:39:50Z","pushed_at":"2016-02-13T00:48:01Z","git_url":"git://github.com/JordanBelford/systemjs-hot-reloader.git","ssh_url":"git@github.com:JordanBelford/systemjs-hot-reloader.git","clone_url":"https://github.com/JordanBelford/systemjs-hot-reloader.git","svn_url":"https://github.com/JordanBelford/systemjs-hot-reloader","homepage":"","size":73,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"capaj:master","ref":"master","sha":"bec44276a02b382c7ac6fa04a843f994d9865b7f","user":{"login":"capaj","id":1305378,"avatar_url":"https://avatars.githubusercontent.com/u/1305378?v=3","gravatar_id":"","url":"https://api.github.com/users/capaj","html_url":"https://github.com/capaj","followers_url":"https://api.github.com/users/capaj/followers","following_url":"https://api.github.com/users/capaj/following{/other_user}","gists_url":"https://api.github.com/users/capaj/gists{/gist_id}","starred_url":"https://api.github.com/users/capaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capaj/subscriptions","organizations_url":"https://api.github.com/users/capaj/orgs","repos_url":"https://api.github.com/users/capaj/repos","events_url":"https://api.github.com/users/capaj/events{/privacy}","received_events_url":"https://api.github.com/users/capaj/received_events","type":"User","site_admin":false},"repo":{"id":43829379,"name":"systemjs-hot-reloader","full_name":"capaj/systemjs-hot-reloader","owner":{"login":"capaj","id":1305378,"avatar_url":"https://avatars.githubusercontent.com/u/1305378?v=3","gravatar_id":"","url":"https://api.github.com/users/capaj","html_url":"https://github.com/capaj","followers_url":"https://api.github.com/users/capaj/followers","following_url":"https://api.github.com/users/capaj/following{/other_user}","gists_url":"https://api.github.com/users/capaj/gists{/gist_id}","starred_url":"https://api.github.com/users/capaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capaj/subscriptions","organizations_url":"https://api.github.com/users/capaj/orgs","repos_url":"https://api.github.com/users/capaj/repos","events_url":"https://api.github.com/users/capaj/events{/privacy}","received_events_url":"https://api.github.com/users/capaj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/capaj/systemjs-hot-reloader","description":"reloads your modules as needed so that you can have satisfyingly fast feedback loop when developing your app","fork":false,"url":"https://api.github.com/repos/capaj/systemjs-hot-reloader","forks_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/forks","keys_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/teams","hooks_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/hooks","issue_events_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/issues/events{/number}","events_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/events","assignees_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/assignees{/user}","branches_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/branches{/branch}","tags_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/tags","blobs_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/git/refs{/sha}","trees_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/statuses/{sha}","languages_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/languages","stargazers_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/stargazers","contributors_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/contributors","subscribers_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/subscribers","subscription_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/subscription","commits_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/commits{/sha}","git_commits_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/git/commits{/sha}","comments_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/comments{/number}","issue_comment_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/issues/comments{/number}","contents_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/contents/{+path}","compare_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/merges","archive_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/downloads","issues_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/issues{/number}","pulls_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls{/number}","milestones_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/milestones{/number}","notifications_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/labels{/name}","releases_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/releases{/id}","deployments_url":"https://api.github.com/repos/capaj/systemjs-hot-reloader/deployments","created_at":"2015-10-07T16:30:12Z","updated_at":"2016-02-16T08:24:04Z","pushed_at":"2016-02-16T15:26:40Z","git_url":"git://github.com/capaj/systemjs-hot-reloader.git","ssh_url":"git@github.com:capaj/systemjs-hot-reloader.git","clone_url":"https://github.com/capaj/systemjs-hot-reloader.git","svn_url":"https://github.com/capaj/systemjs-hot-reloader","homepage":"","size":85,"stargazers_count":106,"watchers_count":106,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":18,"forks":14,"open_issues":18,"watchers":106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/54"},"html":{"href":"https://github.com/capaj/systemjs-hot-reloader/pull/54"},"issue":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/issues/54"},"comments":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/capaj/systemjs-hot-reloader/statuses/d609175edf192732edf3b84a35deafb13e2466e1"}}}}