dustingetz/react-cursor — pull request #3 by damassi (2014-09-23 05:35:57+00:00)
Title: Moved library over to CommonJS from AMD; added `dist` directory; updated example

I know in many cases the debate between CommonJS and AMD is a strong one with valid points on both sides of the isle, but I felt that in the case of React one should stick with conventions, and the convention is generally CommonJS via Browserify and Webpack.

I've updated the library so that it now uses the `module.exports` idiom, and updated your grunt file to use Browserify. It simplifies things completely, including removing the need for bower to handle external dependencies since those are now being pulled in through NPM.

In the `dist` folder I've also included three new files:

- `react-cursor.dev.js` -- This is a "full build", one that you can include inside of your html with all of the different vendor dependencies packaged in
- `react-cursor.js` -- This is an unminified distribution build that specifies, via `externals`, that Underscore and React is not needed
- `react-cursor.min.js` -- This is a minified build

In the latter two files above, one uses the library by pointing to the exports like so:

```
var Cursor = require('./path/to/react-cursor').Cursor;
var ImmutableOptimizations = require('./path/to/react-cursor').ImmutableOptimizations;
```
... or, if you plan on publishing to NPM, simply
```
var Cursor = require('react-cursor').Cursor;
var ImmutableOptimizations = require('react-cursor').ImmutableOptimizations;
```

I know this is an opinionated PR (so feel free to ignore!), but I do believe that by eliminating Bower and Require.js the project has been simplified quite a bit.

Let me know if you'd like any updates to be made!