Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/4.2.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
Olical committed Dec 1, 2014
2 parents 19afbbc + 8a1d87b commit e8167ce
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 82 deletions.
4 changes: 2 additions & 2 deletions EventEmitter.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* EventEmitter v4.2.9 - git.io/ee
* EventEmitter v4.2.10 - git.io/ee
* Oliver Caldwell
* MIT license
* @preserve
*/

(function () {
;(function () {
'use strict';

/**
Expand Down
2 changes: 1 addition & 1 deletion EventEmitter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 36 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
# EventEmitter
# EventEmitter [![Gitter](https://badges.gitter.im/Join Chat.svg)][gitter]

## Event based JavaScript for the browser

As the subtitle suggests, this script brings the power of events from platforms such as [node.js](http://nodejs.org/) to your browser. Although it can be used on any other platform, I just built it with browsers in mind.
As the subtitle suggests, this script brings the power of events from platforms such as [node.js][] to your browser. Although it can be used on any other platform, I just built it with browsers in mind.

This is actually the fourth full rewrite of EventEmitter, my aim is for it to be faster and lighter than ever before. It also has a remapped API which just makes a lot more sense. Because the methods now have more descriptive names it is friendlier to extension into other classes. You will be able to distinguish event method from your own methods.

I have been working on it for over ~~a year~~ two years so far and in that time my skills in JavaScript have come a long way. This script is a culmination of my learnings which you can hopefully find very useful.
I have been working on it for over ~~a year~~ ~~two~~ three years so far and in that time my skills in JavaScript have come a long way. This script is a culmination of my learnings which you can hopefully find very useful.

## Dependencies

There are no hard dependencies. The only reason you will want to run `npm install` to grab the development dependencies is to build the documentation or minify the source code. No other scripts are required to actually use EventEmitter.

## Documentation

* [Guide](https://github.com/Wolfy87/EventEmitter/blob/master/docs/guide.md)
* [API](https://github.com/Wolfy87/EventEmitter/blob/master/docs/api.md)
* [Guide][]
* [API][]

### Examples

* [Simple](http://jsfiddle.net/Wolfy87/qXQu9/)
* [RegExp DOM caster](http://jsfiddle.net/Wolfy87/JqRvS/)
* [Simple][]
* [RegExp DOM caster][]

### Building the documentation
## Contributing (aim your pull request at the `develop` branch!)

If you wish to contribute to the project then please commit your changes into the `develop` branch. All pull requests should contain a failing test which is then resolved by your additions. [A perfect example][example] was submitted by [nathggns][].

## Testing

Tests are performed using [Mocha][] and [Chai][], just serve up the directory using your local HTTP server of choice ([http-server][] is probably a good choice) and open up `tests/index.html`. You can also use the server scripts in the `tools` directory.

## Building the documentation

You can run `tools/doc.sh` to build from the JSDoc comments found within the source code. The built documentation will be placed in `docs/api.md`. I actually keep this inside the repository so each version will have it's documentation stored with it.

Expand All @@ -45,38 +53,32 @@ git submodule add git://github.com/Wolfy87/EventEmitter.git assets/js/EventEmitt
### Package managers

You can also get a copy of EventEmitter through the following package managers:
* [NPM](https://npmjs.org/) (wolfy87-eventemitter)
* [Bower](http://bower.io/) (eventEmitter)
* [Component](http://github.com/component/component) (Wolfy87/EventEmitter)

## Testing

Tests are performed using [Mocha](http://visionmedia.github.io/mocha/) and [Chai](http://chaijs.com/) in the following browsers.

* Firefox
* Chrome
* Opera
* Safari
* IE9+

When testing in the more modern browsers, I run it through the very early versions, some midrange versions and the very latest ones too. I don't just do the latest version.

EventEmitter will always be tested and working perfectly in all of them before a release. I will not release anything I think is riddled with bugs. However, if you do spot one, please [submit it as an issue](https://github.com/Wolfy87/EventEmitter/issues) and I will get right on it.

I had to stop testing in IE<9. This is because Jasmine no longer seems to work in old IE. I converted all of my tests to Mocha/Chai and then realised Chai doesn't work in IE<9 either. I know it works, I just can't run the tests anymore, I still recommend using it in older IE versions. However, if you do encounter problems, all you have to do is roll back before v4.1.0, the first IE9+ only tested version.

As consolation for the lack of legacy browser testing, I have made sure the examples listed above run perfectly in IE6+. So the unit tests might not be able to run, but I am **very** confident that it works absolutely perfectly.

## Contributing

If you wish to contribute to the project then please commit your changes into the `develop` branch. All pull requests should contain a failing test which is then resolved by your additions. [A perfect example](https://github.com/Wolfy87/EventEmitter/pull/46) was submitted by [nathggns](https://github.com/nathggns).
* [NPM][] (wolfy87-eventemitter)
* [Bower][] (eventEmitter)
* [Component][] (Wolfy87/EventEmitter)

## License (MIT)

Copyright (c) 2011-2013 Oliver Caldwell
Copyright (c) 2011-2014 Oliver Caldwell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[guide]: https://github.com/Wolfy87/EventEmitter/blob/master/docs/guide.md
[api]: https://github.com/Wolfy87/EventEmitter/blob/master/docs/api.md
[simple]: http://jsfiddle.net/Wolfy87/qXQu9/
[regexp dom caster]: http://jsfiddle.net/Wolfy87/JqRvS/
[npm]: https://npmjs.org/
[bower]: http://bower.io/
[component]: http://github.com/component/component
[mocha]: http://visionmedia.github.io/mocha/
[chai]: http://chaijs.com/
[issues]: https://github.com/Wolfy87/EventEmitter/issues
[example]: https://github.com/Wolfy87/EventEmitter/pull/46
[nathggns]: https://github.com/nathggns
[http-server]: https://www.npmjs.org/package/http-server
[node.js]: http://nodejs.org/
[gitter]: https://gitter.im/Wolfy87/EventEmitter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eventEmitter",
"description": "Event based JavaScript for the browser",
"version": "4.2.9",
"version": "4.2.10",
"main": [
"./EventEmitter.js"
],
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "eventEmitter",
"repo": "Wolfy87/EventEmitter",
"description": "Event based JavaScript for the browser.",
"version": "4.2.9",
"version": "4.2.10",
"scripts": ["EventEmitter.js"],
"main": "EventEmitter.js",
"license": "MIT"
Expand Down
5 changes: 3 additions & 2 deletions docs/api.dust
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ Each of the methods listed in the API are accessed through an instance of EventE
You may also be interested in [the guide](https://github.com/Wolfy87/EventEmitter/blob/master/docs/guide.md) which highlights some key features of EventEmitter and how to use them. It is a broad overview of the script whereas this is concise information about each method in the API.{~n}
{~n}
{#.}

## {ctx.name}{~n}
{~n}
{description.full|s}{~n}
{~n}
{#tags}
{~s}* **{type}**{?types} ({#types}{.}{@sep} | {/sep}{/types}){/types}{?name} _{name}_{/name}{?description} - {description}{/description}{~n}
{~s}* **{type}**{?types} ({#types}`{.}`{@sep} | {/sep}{/types}){/types}{?name} _{name}_{/name}{?description} - {description}{/description}{~n}
{/tags}
{@sep}{~n}{/sep}
{~n}
{/.}
Loading

0 comments on commit e8167ce

Please sign in to comment.