-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Module / Package Refactor #323
Comments
👍 to putting each plugin in its own module. The second option ( Also, if you already plan on using webpack, it can target UMD. |
Echoing @matthewwithanm – 👍 to having each plugin in its own module. |
Browserify can also build for UMD. It has the advantage of being able to expose build configure via For actually generating these UMD builds and getting the It's very much geared towards my style right now but I'd be happy to make it more configurable. |
👍 |
While refactoring, keep in mind the possibility of offline use, see #279 |
This has been done as of 2.0. 🍰 |
I'm going to open a separate ticket regarding raven-node possibly merging in since that's a separate topic and not sure yet if we still think that's a good idea or not. |
Goals
Proposal
API
The primary target here is module-based usage, so the following should work:
Both the node.js client and the javascript client should expose the same APIs. That is, they should expose the spec from Sentry with identical arguments (to the best of their ability).
Code Exposure
Internally (via the module system) we want to expose a great deal of Raven. If we can, all of it. That said, 'raven' itself would only export the public namespaces, and you'd have to include other module(s) to get access to those.
Plugins
Modeled after webpack, instead of straight up patching, each plugin would have a load/unload hook responsible for it's behavior:
Alternatively we could namespace builtin plugins:
See #282
Bundling
We need to determine how best to bundle things with the umd wrapper. There are things like grunt-umd to aid with this.
See also: https://github.com/umdjs/umd/blob/ce6c20e318e58cd301ee929135cf651b02392c08/returnExports.js
This will still need a build task, but the primary resource for this is the Sentry CDN, so it's possible we can move the dist/ out of the codebase.
The raven.js bundle would expose the identical namespace as 'raven'. That is, only the public API and none of the others.
Notes
The text was updated successfully, but these errors were encountered: