Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add info about unit tests, fix package.json and add gitignore.
  • Loading branch information
millermedeiros committed Nov 2, 2011
1 parent fcd5d3b commit 0fbbd1e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .gitignore
@@ -0,0 +1,10 @@
.tmp*
.project
.settings/

node_modules/

.DS_Store?
ehthumbs.db
Icon?
Thumbs.db
36 changes: 33 additions & 3 deletions README.mdown
Expand Up @@ -15,7 +15,7 @@ resolved after all the signals on the group are dispatched. (similar to

## Dependency

[JS-Signals](http://millermedeiros.github.com/js-signals/)
[JS-Signals v0.7.0+](http://millermedeiros.github.com/js-signals/)


## Example
Expand All @@ -34,15 +34,15 @@ var completedManyThings = new signals.CompoundSignal(endedAnimation, completedSo
completedManyThings.addOnce( doSomethingOnCompletedManyThings );

function doSomethingOnCompletedManyThings(paramsArr1, paramsArr2){
//handler would receive parameters of each signal as arrays since
//handler would receive parameters of each signal as arrays since
//they can dispatch an arbitrary number of parameters
console.log( paramsArr1, paramsArr2 );
}
```

If loaded using an AMD loader (e.g. [RequireJS](http://requirejs.org/)) or
inside nodejs it will return the constructor and also add itself to the
`signals` object.
`signals` object (to keep consistency with browser environment).

### AMD

Expand Down Expand Up @@ -105,3 +105,33 @@ Check if CompoundSignal did resolved.

Restore CompoundSignal to it's original state. Will consider as if no signals
was dispatched yet and will mark CompoundSignal as unresolved.



## Distribution Files

You can use the same distribution file for all the evironments, browser script
tag, AMD, CommonJS.

You can install it on Node.js using [NPM](http://npmjs.org/)

npm install CompoundSignal



## Running unit tests

### On the browser

Open `tests/spec_runner.html` on your browser.


### On Node.js

Install [npm](http://npmjs.org) and run:

```
npm install jasmine-node -g
npm link
jasmine-node dev/tests/spec
```
7 changes: 5 additions & 2 deletions package.json
Expand Up @@ -4,14 +4,17 @@
"keywords" : ["js-signals", "signals", "pub/sub", "event", "publish", "subscribe", "observer", "when", "deferred", "promises"],
"homepage" : "https://github.com/millermedeiros/CompoundSignal/",
"version" : "0.1.0",
"author" : "Miller Medeiros (http://blog.millermedeiros.com)",
"author" : {
"name" : "Miller Medeiros",
"url" : "http://blog.millermedeiros.com/"
},
"repository" : {
"type" : "git",
"url" : "https://github.com/millermedeiros/CompoundSignal.git"
},
"main" : "src/CompoundSignal.js",
"bugs" : {
"web" : "https://github.com/millermedeiros/CompoundSignal/issues"
"url" : "https://github.com/millermedeiros/CompoundSignal/issues"
},
"licenses" : [
{
Expand Down
File renamed without changes.

0 comments on commit 0fbbd1e

Please sign in to comment.