diff --git a/.gitignore b/.gitignore
index 3c3629e..93f1361 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
node_modules
+npm-debug.log
diff --git a/History.md b/History.md
index b345858..2802a06 100644
--- a/History.md
+++ b/History.md
@@ -1,3 +1,7 @@
+# 1.2.0 (2016-07-26)
+
+ - Enable support for AMD, CommonJS and as browser script.
+
# 1.1.1 (2016-06-22)
- add more context to errors if they are not instanceof Error
diff --git a/Readme.md b/Readme.md
index 02694ef..8503d5d 100644
--- a/Readme.md
+++ b/Readme.md
@@ -14,6 +14,15 @@ npm install events
var EventEmitter = require('events').EventEmitter
```
+## Browser ##
+
+```html
+
+
+```
+
## Usage ##
See the [node.js event emitter docs](http://nodejs.org/api/events.html)
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..45b7fb5
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,25 @@
+{
+ "name": "events",
+ "description": "Node's event emitter for the browser.",
+ "main": "./events.js",
+ "authors": [
+ "Irakli Gozalishvili (http://jeditoolkit.com)",
+ "Escaux Product Development (http://escaux.com)"
+ ],
+ "license": "MIT",
+ "keywords": [
+ "events",
+ "eventEmitter",
+ "eventDispatcher",
+ "listeners"
+ ],
+ "homepage": "https://github.com/Escaux/events",
+ "ignore": [
+ "**/.*",
+ "package.json",
+ "npm-debug.log",
+ "node_modules",
+ "bower_components",
+ "tests"
+ ]
+}
diff --git a/events.js b/events.js
index 1619a62..7179696 100644
--- a/events.js
+++ b/events.js
@@ -19,6 +19,19 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
+((function (root, factory) {
+ var name = 'events';
+ if (typeof define === 'function' && define.amd) {
+ define(name, [], function () {
+ return factory({});
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ factory(module);
+ } else {
+ root[name] = factory({});
+ }
+})(this, function (module) {
+
function EventEmitter() {
this._events = this._events || {};
this._maxListeners = this._maxListeners || undefined;
@@ -300,3 +313,7 @@ function isObject(arg) {
function isUndefined(arg) {
return arg === void 0;
}
+
+return EventEmitter;
+
+}));
diff --git a/package.json b/package.json
index 5d7e797..dcef774 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "events",
"id": "events",
- "version": "1.1.1",
+ "version": "1.2.0",
"description": "Node's event emitter for all engines.",
"keywords": [
"events",