{ "html": "
\n

Installation

\n

Raven.js and the Raven.js Ember plugin are distributed using a few different methods.

\n
\n

Using our CDN

\n

For convenience, our CDN serves a single, minified JavaScript file containing both Raven.js and the Raven.js Ember plugin. It should be included after Ember, but before your application code.

\n

Example:

\n
<script src="http://builds.emberjs.com/tags/v2.3.1/ember.prod.js"></script>\n<script src="https://cdn.ravenjs.com/3.20.1/ember/raven.min.js" crossorigin="anonymous"></script>\n<script>Raven.config('___PUBLIC_DSN___').install();</script>\n
\n
\n

Note that this CDN build auto-initializes the Ember plugin.

\n
\n
\n

Using package managers

\n

Pre-built distributions of Raven.js and the Raven.js Ember plugin are available via both Bower and npm for importing in your ember-cli-build.js file.

\n
\n

Bower

\n
$ bower install raven-js --save\n
\n
\n
app.import('bower_components/raven-js/dist/raven.js');\napp.import('bower_components/raven-js/dist/plugins/ember.js');\n
\n
\n
<script src="assets/vendor.js"></script>\n<script>\n  Raven\n    .config('___PUBLIC_DSN___')\n    .addPlugin(Raven.Plugins.Ember)\n    .install();\n</script>\n<script src="assets/your-app.js"></script>\n
\n
\n
\n
\n

npm

\n
$ npm install raven-js --save\n
\n
\n
app.import('node_modules/raven-js/dist/raven.js');\napp.import('node_modules/raven-js/dist/plugins/ember.js');\n
\n
\n
<script src="assets/vendor.js"></script>\n<script>\n  Raven\n    .config('___PUBLIC_DSN___')\n    .addPlugin(Raven.Plugins.Ember)\n    .install();\n</script>\n<script src="assets/your-app.js"></script>\n
\n
\n

These examples assume that Ember is exported globally as window.Ember. You can alternatively pass a reference to the Ember object directly as the second argument to addPlugin:

\n
Raven.addPlugin(Raven.Plugins.Ember, Ember);\n
\n
\n
\n
\n
\n", "link": "https://docs.getsentry.com/clients/javascript/integrations/ember/", "id": "javascript-ember", "name": "Ember" }