-
Notifications
You must be signed in to change notification settings - Fork 127
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
Made tab reload optional - sometimes we have our own code to reinject… #13
base: master
Are you sure you want to change the base?
Conversation
… content script necessities, or we don't have content script, and sometimes we don't want the page to refresh
3d98f1a
to
6a48d8f
Compare
@mikob I wonder if we can read |
@xpl Why would that be nicer? That would be surprising IMO. I think it's best to follow standard, unsurprising practices and let options be passed in the same way they are with most other modules. I also think that the CRX reloading isn't closely tied with what's specified in manifest.json. eg. in my case I need to exclude hot-updated files (eg. the extension options page) from reloading the CRX because those are already injected and I don't want the options page to close as it does automatically when the CRX is reloaded. |
Because it would maintain the backward compatibility with the current "zero-configuration" version. In the proposed new version users are supposed to explicitly pass the configuration to start watching files. That requires making changes to the code to make it work, right? |
Also, putting scripts/plugins options to manifest files is not unusual. For example, it is norm with Of course, providing the ability to configure from the code is also convenient, because it would allow to dynamically create those options in case if it's needed. So maybe it is good to support both ways, I dunno. |
Could you also please combine all your PRs into a single one? It would be easier to review and edit it then. They all seem linked and also all of them seem useful (there were prior requests to add file inclusion/exclusion), so if we are going to add that functionality, better add it all at once. |
@xpl yes, it would be nice to have backwards compatibility but I think these changes warrant a major version bump/compatibility break? Configuration in package.json is usually for toolchain related stuff, as you said. Tools that can be configured in package.json like tslint, ava, tsconfig are never instantiated in user-land code so it makes sense that they configure in an external file. This library needs to be instantiated in userland... so it makes more sense that the configuration goes along with it when it's instantiated. If this were a webpack plugin, or otherwise didn't live in userland code, I would agree that configuration should be separated from userland code.
You can see them all together in the final PR I made. Lastly, I don't mean this in any passive-aggressive way, but just so you're not waiting around for it, I won't be making the changes to this PR. So someone else would need to pick up the slack if you're still unsatisfied. |
… content script necessities, or we don't have content script, and sometimes we don't want the page to refresh