Skip to content

akatov/ember-cli-strophe-shim

Repository files navigation

ember-cli-strophe-shim

Build Status npm Version Ember Observer Score Ember badge

ES6 accessible modules for Strophe within your Ember applications.

Installation

ember install ember-cli-strophe-shim

Usage

import Strophe from 'ember-cli-strophe-shim';
import Connection from 'ember-cli-strophe-shim/connection';
import Builder, { $pres } from 'ember-cli-strophe-shim/builder';

Ember.debug(`Strophe version ${ Strophe.VERSION }`);
Ember.assert('Builder is a constructor', Ember.typeOf(new Builder('iq')) === 'object');

let c = new Connection('http://localhost:5280/http-bind/');
c.connect('[email protected]', 'my-password');

// ... then later

c.send($pres());

Strophe Plugins

To enable a Strophe plugin include it in your config like so:

  • config/environment.js
module.exports = function(environment) {
  return {
     strophe: {
       plugins: [
         'ping',
         'roster'
       ]
     }
  };
};

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published