-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add webpack-extension-reloader
and webextension-polyfill-ts
#61
Conversation
Added two tools (webextension-feedback-popup, webpack-extension-reloader) and a library (webextension-polyfill-ts)
@@ -43,6 +43,7 @@ Code meant become part of the extension. | |||
- [webext-storage-cache](https://github.com/fregante/webext-storage-cache) - Map-like promised cache storage with expiration. | |||
- [webext-dynamic-content-scripts](https://github.com/fregante/webext-dynamic-content-scripts) - Automatically inject your `content_scripts` on custom domains. | |||
- [mozilla/webextension-polyfill](https://github.com/mozilla/webextension-polyfill) - Polyfill to support the standardized promise based API in the `browser` namespace. | |||
- [webextension-polyfill-ts](https://github.com/Lusito/webextension-polyfill-ts) - *TypeScript-ready* polyfill to support the standardized promise based API in the `browser` namespace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I like this, I prefer just installing the types directly, which is already mentioned in the readme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? One is without JS doc and the other one is chrome only. With manifest 3 coming you'd want an up-to-date doc, which @Lusito's plugin provides.
It's even mentioned in the Mozilla readme
webextension-polyfill-ts: Types and JS-Doc are automatically generated from the mozilla schema files, so it is always up-to-date with the latest APIs. It also bundles the webextension-polyfill for very simple usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One is without JS doc
Which one is without JSDoc?
the other one is chrome only
I assume you're referring to @types/chrome
, which isn't mentioned in the docs.
With manifest 3 coming you'd want an up-to-date doc, which Lusito's plugin provides
And so does https://github.com/jsmnbom/definitelytyped-firefox-webext-browser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which is already mentioned in the readme
must have read over that line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna go out on a limb here and say, that the definitelytyped project you mentioned can't have as complete code as my lib does. While it also fetches definitions from schemas to generate code, the schemas are quite flawed and need a lot of fixes.
Just by looking at the little code that is contained in the project to generate the types, it can't cover all the cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you’re here, why are you wrapping the polyfill into its own module instead of taking the regular @types
route like other type-less packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. Honestly not sure anymore. Probably historic reasons that no longer apply. I've never tried to contribute to @types
. Will look into it.
webpack-extension-reloader
and webextension-polyfill-ts
Added two tools (webextension-feedback-popup, webpack-extension-reloader) and a library (webextension-polyfill-ts)