diff --git a/.gitignore b/.gitignore index 91dfed8..0c3454b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store -node_modules \ No newline at end of file +node_modules +npm-debug.log \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..053e7e8 --- /dev/null +++ b/.npmignore @@ -0,0 +1,4 @@ +node_modules +babel.js +browserify.js +.gitignore \ No newline at end of file diff --git a/README.md b/README.md index 2a381b7..273eeea 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ > A JavaScript Emitter written in ES6. -## ES6 Usage +## Usage ```js import Emitter from 'emitter'; @@ -11,15 +11,6 @@ const bus = new Emitter(); bus.emit('finish'); ``` -## ES5 Usage -```js -var Emitter = require('emitter/es5'); - -var bus = new Emitter(); - -bus.emit('finish'); -``` - ## API ### Emitter#on(event, listener) @@ -60,7 +51,11 @@ emitter.emit('live', 'data1', 'data2'); ## npm-scripts ``` -$ npm run es5 +$ npm run compile +``` + +``` +$ npm run browser ``` ``` diff --git a/babel.js b/babel.js index c7c46b1..d2e7ac1 100644 --- a/babel.js +++ b/babel.js @@ -1,13 +1,22 @@ 'use strict'; +/** + * Dependencies + */ var fs = require('fs'); var babel = require('babel'); -if (!fs.existsSync('./es5')) { - fs.mkdirSync('./es5'); +/** + * Create directories + */ +if (!fs.existsSync('./dist')) { + fs.mkdirSync('./dist'); } -babel.transformFile('index.js', {'loose': ['es6.classes']}, function (err, result) { +/** + * Babel + */ +babel.transformFile('./src/index.js', {'loose': ['es6.classes', 'es6.modules']}, function (err, result) { if (err) { console.log('Error : ' + err.message); } - fs.writeFileSync('./es5/index.js', result.code); -}); \ No newline at end of file + fs.writeFileSync('./dist/index.js', result.code); +}); diff --git a/browser/index.js b/browser/index.js new file mode 100644 index 0000000..4b508df --- /dev/null +++ b/browser/index.js @@ -0,0 +1,158 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Emitter = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var listeners = undefined; + + // Defines listeners value. + if (!this._eventCollection || !(listeners = this._eventCollection[event])) { + return this; + } + + // Clone listeners + listeners = listeners.slice(0); + + listeners.forEach(function (fn) { + return fn.apply(_this, args); + }); + + return this; + }; + + return Emitter; +})(); + +/** + * Exports Emitter + */ +exports["default"] = Emitter; +module.exports = exports["default"]; + +},{}]},{},[1])(1) +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIvVXNlcnMvcGF6Z3VpbGxlL2RldmVsb3Blci9lbWl0dGVyL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7SUNVTSxPQUFPO1dBQVAsT0FBTzswQkFBUCxPQUFPOzs7Ozs7Ozs7Ozs7Ozs7QUFBUCxTQUFPLFdBYVgsRUFBRSxHQUFBLFlBQUMsS0FBSyxFQUFFLFFBQVEsRUFBRTs7QUFFbEIsUUFBSSxDQUFDLGdCQUFnQixHQUFHLElBQUksQ0FBQyxnQkFBZ0IsSUFBSSxFQUFFLENBQUM7OztB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Z1bmN0aW9uXG4gICAqIEBwYXJhbSB7U3RyaW5nfSBldmVudCAtIFRoZSBuYW1lIG9mIHRoZSBldmVudCB5b3Ugd2FudCB0byBlbWl0LlxuICAgKiBAcGFyYW0gey4uLk9iamVjdH0gZGF0YSAtIERhdGEgdG8gcGFzcyB0byB0aGUgbGlzdGVuZXJzLlxuICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIGFuIGluc3RhbmNlIG9mIEVtaXR0ZXIuXG4gICAqIEBleGFtcGxlXG4gICAqIC8vIEVtaXRzIHRoZSBcImZvb1wiIGV2ZW50IHdpdGggJ3BhcmFtMScgYW5kICdwYXJhbTInIGFzIGFyZ3VtZW50cy5cbiAgICogZW1pdHRlci5lbWl0KCdmb28nLCAncGFyYW0xJywgJ3BhcmFtMicpO1xuICAgKi9cbiAgZW1pdChldmVudCwgLi4uYXJncykge1xuICAgIGxldCBsaXN0ZW5lcnM7XG5cbiAgICAvLyBEZWZpbmVzIGxpc3RlbmVycyB2YWx1ZS5cbiAgICBpZiAoIXRoaXMuX2V2ZW50Q29sbGVjdGlvbiB8fCAhKGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50Q29sbGVjdGlvbltldmVudF0pKSB7XG4gICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICAvLyBDbG9uZSBsaXN0ZW5lcnNcbiAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoMCk7XG5cbiAgICBsaXN0ZW5lcnMuZm9yRWFjaChmbiA9PiBmbi5hcHBseSh0aGlzLCBhcmdzKSk7XG5cbiAgICByZXR1cm4gdGhpcztcbiAgfVxuXG59XG5cbi8qKlxuICogRXhwb3J0cyBFbWl0dGVyXG4gKi9cbmV4cG9ydCBkZWZhdWx0IEVtaXR0ZXI7XG4iXX0= diff --git a/browserify.js b/browserify.js new file mode 100644 index 0000000..8568750 --- /dev/null +++ b/browserify.js @@ -0,0 +1,23 @@ +'use strict'; + +/** + * Dependencies + */ +var fs = require('fs'); +var browserify = require('browserify'); + +/** + * Create directories + */ +if (!fs.existsSync('./browser')) { + fs.mkdirSync('./browser'); +} + +/** + * Browserify + */ +browserify({ 'entries': './src/index.js', 'standalone': 'Emitter', 'debug': true }) + .transform('babelify', {'loose': ['es6.classes', 'es6.modules']}) + .bundle() + .on('error', function (err) { console.log('Error : ' + err.message); }) + .pipe(fs.createWriteStream('browser/index.js')); \ No newline at end of file diff --git a/es5/index.js b/dist/index.js similarity index 97% rename from es5/index.js rename to dist/index.js index 42c0665..c9211cd 100644 --- a/es5/index.js +++ b/dist/index.js @@ -2,6 +2,7 @@ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; +exports.__esModule = true; /** * Creates a new instance of Emitter. * @class @@ -148,4 +149,5 @@ var Emitter = (function () { /** * Exports Emitter */ -module.exports = Emitter; \ No newline at end of file +exports["default"] = Emitter; +module.exports = exports["default"]; \ No newline at end of file diff --git a/package.json b/package.json index b7eb074..4cc2ac7 100644 --- a/package.json +++ b/package.json @@ -1,25 +1,34 @@ { "name": "emitter", - "repository": "git@github.com:mango/emitter.git", + "repository": { + "type": "git", + "url": "git@github.com:mango/emitter.git" + }, "description": "A JavaScript event emitter written in ES6.", - "author": "Guille Paz ", - "version": "0.0.2", + "author": { + "name": "Guille Paz", + "email": "guille87paz@gmail.com" + }, + "version": "0.0.4", "scripts": { "test": "_mocha", - "es5": "node babel.js", - "hint": "jshint index.js", - "prepublish": "npm run es5" + "hint": "jshint ./src/index.js", + "compile": "node babel.js", + "browser": "node browserify.js", + "prepublish": "npm run compile" }, "dependencies": {}, "devDependencies": { "babel": "^5.0.2", + "babelify": "^6.0.0", "better-assert": "1.0.2", + "browserify": "^9.0.7", "jshint": "2.6.3", "mocha": "2.1.0" }, - "main": "index.js", + "main": "./dist/index.js", "keywords": [ "emitter" ], "license": "MIT" -} +} \ No newline at end of file diff --git a/index.js b/src/index.js similarity index 100% rename from index.js rename to src/index.js diff --git a/test/test.js b/test/test.js index c04fbd4..fc2a9fa 100644 --- a/test/test.js +++ b/test/test.js @@ -1,5 +1,5 @@ import assert from 'assert'; -import Emitter from '../index.js'; +import Emitter from '../src/index.js'; const bus = new Emitter();