fschaefer/Stately.js — pull request #2 by rowanu (2012-10-13 21:14:55+00:00)
Title: npm package.json added

Included a `package.json` file to allow Stately.js to be used more easily with Node.js.

Even if you don't want to [publish it in npm](https://npmjs.org/doc/publish.html), this change means that anyone can check the repo out in the `node_modules` directory and used thusly:

Stately = require('Stately.js').Stately;

// constructor
machine = new Stately(statesObject);
...

// factory
machine = Stately.machine(statesObject);
...

I didn't change the container Stately object, because I didn't want to break any existing code, but a more node-friendly way would be to remove it (so you could just do `Stately = require('Stately.js');`). If you're open to that, let me know and I'll do it.