{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/web-ext/issues/219","repository_url":"https://api.github.com/repos/mozilla/web-ext","labels_url":"https://api.github.com/repos/mozilla/web-ext/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/web-ext/issues/219/comments","events_url":"https://api.github.com/repos/mozilla/web-ext/issues/219/events","html_url":"https://github.com/mozilla/web-ext/pull/219","id":151231197,"number":219,"title":"Run cmd watches source, reloads addon in Firefox","user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/web-ext/labels/pull-request-ready","name":"pull-request-ready","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"rpl","id":11484,"avatar_url":"https://avatars.githubusercontent.com/u/11484?v=3","gravatar_id":"","url":"https://api.github.com/users/rpl","html_url":"https://github.com/rpl","followers_url":"https://api.github.com/users/rpl/followers","following_url":"https://api.github.com/users/rpl/following{/other_user}","gists_url":"https://api.github.com/users/rpl/gists{/gist_id}","starred_url":"https://api.github.com/users/rpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpl/subscriptions","organizations_url":"https://api.github.com/users/rpl/orgs","repos_url":"https://api.github.com/users/rpl/repos","events_url":"https://api.github.com/users/rpl/events{/privacy}","received_events_url":"https://api.github.com/users/rpl/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-04-26T20:28:05Z","updated_at":"2016-05-03T17:13:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/web-ext/pulls/219","html_url":"https://github.com/mozilla/web-ext/pull/219","diff_url":"https://github.com/mozilla/web-ext/pull/219.diff","patch_url":"https://github.com/mozilla/web-ext/pull/219.patch"},"body":"Fixes https://github.com/mozilla/web-ext/issues/222\r\n\r\nWith this patch you can execute `web-ext run` and it will reload your extension in Firefox as you edit the source. If you want to disable it, you can do `web-ext run --no-reload`.\r\n\r\nI'm sure that are still corner cases that will need addressing (I've filed [some bugs](https://github.com/mozilla/web-ext/labels/auto-reloading)) but this is probably OK for a first pass. Also, this has a build and reinstall step which can be optimized away later.\r\n\r\nSome of the architecture in the `run.js` module feels awkward to me. Let me know if you have some ideas for how to simplify it."},"comment":{"url":"https://api.github.com/repos/mozilla/web-ext/issues/comments/216599893","html_url":"https://github.com/mozilla/web-ext/pull/219#issuecomment-216599893","issue_url":"https://api.github.com/repos/mozilla/web-ext/issues/219","id":216599893,"user":{"login":"kumar303","id":55398,"avatar_url":"https://avatars.githubusercontent.com/u/55398?v=3","gravatar_id":"","url":"https://api.github.com/users/kumar303","html_url":"https://github.com/kumar303","followers_url":"https://api.github.com/users/kumar303/followers","following_url":"https://api.github.com/users/kumar303/following{/other_user}","gists_url":"https://api.github.com/users/kumar303/gists{/gist_id}","starred_url":"https://api.github.com/users/kumar303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kumar303/subscriptions","organizations_url":"https://api.github.com/users/kumar303/orgs","repos_url":"https://api.github.com/users/kumar303/repos","events_url":"https://api.github.com/users/kumar303/events{/privacy}","received_events_url":"https://api.github.com/users/kumar303/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T17:13:40Z","updated_at":"2016-05-03T17:13:40Z","body":"I think this is ok to merge for now. We identified the improvements that need to be made:\r\n- when supporting more reload strategies, we'll need a more flexible abstraction\r\n- the build step is not technically necessary so it should be removed. It adds slowness and more code complexity because of how temp dirs need to be torn down (addressed in https://github.com/mozilla/web-ext/issues/239)\r\n- this patch, as is, will fail against Nightly Firefox for some subtle edge cases, such as changing the name in the manifest before a reload"}}