Skip to content

Build plugin files into /dist for use w/o package manager #476

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

Merged
merged 2 commits into from
Jan 18, 2016

Conversation

benvinegar
Copy link
Contributor

Continuation of @floriangosse's work in #455 (addressing issue #446)

Added here:

  • Each plugin is exported onto the Raven global as Raven.PluginnamePlugin, e.g. Raven.AngularPlugin,Raven.ConsolePlugin, etc
  • Unlike CDN "combo builds", these individual plugin files do not auto-add themselves to the Raven ecosystem; they have to be added manually via Raven.addPlugin

Example usage:

<script src="node_modules/dist/raven.js"></script>
<script src="node_modules/dist/plugins/angular.js"></script>
<script src="node_modules/dist/plugins/console.js"></script>
<script>
Raven
    .config('https://[email protected]/1')
    .addPlugin(Raven.AngularPlugin)
    .addPlugin(Raven.ConsolePlugin)
    .install();
</script>

@Sija
Copy link
Contributor

Sija commented Jan 18, 2016

Wouldn't be nicer to have 'em (plugins) in separate namespace, like Raven.Plugins? You could inspect just this namespace to find out which plugins are loaded at the given moment.

@benvinegar
Copy link
Contributor Author

@Sija – That's a good idea. I'll make that change, barring any objections from comments here.

@benvinegar
Copy link
Contributor Author

cc @mattrobenolt

@benvinegar
Copy link
Contributor Author

Okay, going to merge this in for a 2.1.0-beta release today. If we hit any snags we can follow up w/ fixes before 2.1.0 goes out officially.

benvinegar added a commit that referenced this pull request Jan 18, 2016
Build plugin files into /dist for use w/o package manager
@benvinegar benvinegar merged commit ad4985a into master Jan 18, 2016
@benvinegar benvinegar deleted the plugin-bower branch January 18, 2016 21:50
@luiscvalmeida
Copy link

@benvinegar please fix your comment, where you specify: addPlugin(Raven.AngularPlugin), it is now addPlugin(Raven.Plugins.Angular), same to the console plugin.

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

Successfully merging this pull request may close these issues.

4 participants