Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger an extension reload from the CLI with keyboard input #705

Closed
kumar303 opened this issue Dec 23, 2016 · 5 comments
Closed

Trigger an extension reload from the CLI with keyboard input #705

kumar303 opened this issue Dec 23, 2016 · 5 comments
Assignees

Comments

@kumar303
Copy link
Contributor

Is this a bug or feature request?

feature request

What is the current behavior?

When using web-ext run, the extension will be automatically reloaded when you edit the source.

What is the expected or desired behavior?

It would be nice to trigger a reload manually from the CLI. You can make a new blank line in one of your files and save it but that's a hacky workaround.

I found myself needing such a feature because I had erased some logs and I wanted to reload my background script to see the startup logging again. I don't know if people would need it much but it should be easy to implement. We could just listen for Enter or R or whatever key and do the reload.

@saintsebastian
Copy link
Contributor

I would like to work on this, seems very useful

@kumar303
Copy link
Contributor Author

Hi @saintsebastian , that's great. I was working on an extension today that could have benefited from this feature.

I think we could simply intercept the letter 'R' to trigger a reload. It could show a prompt like 'Press R to reload the extension' and it could maybe use this technique for reading the 'R' character (I haven't tried this though, maybe there is a library for it?).

@kumar303
Copy link
Contributor Author

@saintsebastian hey! I just pushed this out in 1.9.0 https://github.com/mozilla/web-ext/releases/tag/1.9.0 Thanks again. Could you add a new section in the docs about it right under the Automatic extension reloading section?

@saintsebastian
Copy link
Contributor

@kumar303 It is surprisingly hard to phrase for such a small function :) Feel free to fix my version.

@kumar303
Copy link
Contributor Author

ah, yeah, that's a tough one. I made a minor edit to make it a bit more clear. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants