/* jshint node: true */
'use strict';

module.exports = {

  name: 'ember-cli-sentry',

  contentFor: function(type, config){
    if (type === 'body' && !config.sentry.skipCdn) {
      return '<script src="' + config.sentry.cdn + '/' + config.sentry.version + '/ember,jquery,native/raven.min.js"></script>';
    }
  }

};

/* jshint node: true */
'use strict';

module.exports = {

  name: 'ember-cli-sentry',

  contentFor: function(type, config){
    if (type === 'body-footer' && !config.sentry.skipCdn) {
      return '<script src="' + config.sentry.cdn + '/' + config.sentry.version + '/ember,jquery,native/raven.min.js"></script>';
    }
  }

};

Use 'body-footer' to ensure Raven is loaded after Ember.
Use 'body-footer' to ensure Raven is loaded after Ember.

`{{content-for 'body'}}` is typically before the `vendor.js` file's
script tag, so this switches to using `body-footer` to ensure `Raven` is
loaded after Ember itself.
