ember-cli-strophe-shim
v0.0.1
Published
ES6 accessible modules of Strophe for Ember.
Downloads
1
Readme
ember-cli-strophe-shim
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
(Runsember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server