Skip to content

gzurbach/ember-cli-trackjs

 
 

Repository files navigation

ember-cli-trackjs Build Status Dependency Status Ember Observer Score

Handles all of the boilerplate shit you need to use TrackJS in your fancy Ember application.

Settings

Configure TrackJS in your application's config/environment.js file. Please see the TrackJS documentation for specific configuration options.

Example

var ENV = {
  trackJs: {
    addon: {
      url: "path/to/trackjs.js" // provided by TrackJS
    },
    config: {
      token: "1234567890"
    }
  }
};

if (environment === 'test') {
  ENV.trackJs.config.enabled = false;
}

See? Pretty much like you'd expect.

Usage

A service is exposed on your routes and controllers that you can use to report errors instead of having to use the global window.trackJs object.

Example in a Route

export default {
  beforeModel: function () {
    this.trackjs.track('oh, snap. something bad happened');
  }
};

Example in a Controller

export default Ember.Controller.extend({
  reportSomethingForSomeReason: function () {
    this.trackjs.track('oh, snap. something bad happened');
  }.on('init')
});

Installation

ember install:addon ember-cli-trackjs

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

About

Use TrackJS with Your Fancy Ember CLI App

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 82.2%
  • HTML 17.2%
  • Handlebars 0.6%