Skip to content

Commit 53d911a

Browse files
committed
Initial commit
0 parents  commit 53d911a

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

Readme.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# Bus
3+
4+
Application-wide event bus component (a Singleton `Emitter`).
5+
6+
## Installation
7+
8+
```
9+
$ npm install bus-component
10+
```
11+
12+
## API
13+
14+
```js
15+
var bus = require('bus');
16+
bus.emit('stuff');
17+
```

index.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
/**
3+
* Module dependencies.
4+
*/
5+
6+
var Emitter = require('emitter');
7+
8+
/**
9+
* Expose the event bus.
10+
*/
11+
12+
module.exports = new Emitter;

package.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "bus-component",
3+
"description": "Application-wide event bus",
4+
"version": "0.0.1",
5+
"dependencies": {
6+
"emitter-component": "*"
7+
},
8+
"devDependencies": {
9+
"mocha": "*",
10+
"should": "*"
11+
},
12+
"component": {
13+
"scripts": {
14+
"bus": "index.js"
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)