Skip to content

Commit

Permalink
Explicitly define AMD modules to prevent errors with AlmondJS and Ang…
Browse files Browse the repository at this point in the history
…ularJS
  • Loading branch information
wesley-harding committed Mar 22, 2015
1 parent 9e285ea commit fb717ab
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Strophe.js Change Log

## Version 1.2.2 - 2015-03-22
* Explicitly define AMD modules to prevent errors with AlmondJS and AngularJS

## Version 1.2.1 - 2015-02-22
* Rerelease of 1.2.0 but with a semver tag and proper formatting of bower.json
for usage with Bower.io.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "strophe.js",
"description": "Strophe.js is an XMPP library for JavaScript",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "http://strophe.im/strophejs",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/base64.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function () {
define('strophe-base64', function () {
return factory();
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/bosh.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['strophe-core'], function (core) {
define('strophe-bosh', ['strophe-core'], function (core) {
return factory(
core.Strophe,
core.$build
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([
define('strophe-core', [
'strophe-sha1',
'strophe-base64',
'strophe-md5',
Expand Down
2 changes: 1 addition & 1 deletion src/md5.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function () {
define('strophe-md5', function () {
return factory();
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/sha1.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function () {
define('strophe-sha1', function () {
return factory();
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['strophe-core'], function (core) {
define('strophe-websocket', ['strophe-core'], function (core) {
return factory(
core.Strophe,
core.$build
Expand Down
12 changes: 6 additions & 6 deletions strophe.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function () {
define('strophe-base64', function () {
return factory();
});
} else {
Expand Down Expand Up @@ -130,7 +130,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function () {
define('strophe-sha1', function () {
return factory();
});
} else {
Expand Down Expand Up @@ -326,7 +326,7 @@ return {
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function () {
define('strophe-md5', function () {
return factory();
});
} else {
Expand Down Expand Up @@ -630,7 +630,7 @@ if (!Array.prototype.indexOf)
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([
define('strophe-core', [
'strophe-sha1',
'strophe-base64',
'strophe-md5',
Expand Down Expand Up @@ -3927,7 +3927,7 @@ return {
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['strophe-core'], function (core) {
define('strophe-bosh', ['strophe-core'], function (core) {
return factory(
core.Strophe,
core.$build
Expand Down Expand Up @@ -4797,7 +4797,7 @@ return Strophe;
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['strophe-core'], function (core) {
define('strophe-websocket', ['strophe-core'], function (core) {
return factory(
core.Strophe,
core.$build
Expand Down
7 changes: 4 additions & 3 deletions strophe.min.js

Large diffs are not rendered by default.

0 comments on commit fb717ab

Please sign in to comment.