jlord/sheetsee.js — pull request #23 by remixz (2013-08-17 01:32:19+00:00)
Title: Refactor Sheetsee for Browserify-ing

Hey!

Sheetsee is totally rad, and I'm planning to use it in some upcoming things. Because Browserify is totally cool, I thought it would be neat to have Sheetsee be Browserify ready. I ended up doing quite a bit more than I thought I would.

Sheetsee itself has been refactored a bunch, with instead of exporting the functions with a function, instead Sheetsee is now an object with all the functions inside. This allows for more modularity, which is what I've done. The d3 and mapbox portions of sheetsee are now independent components, which could be made even better by publishing them as npm modules. As well, some of the dependencies are now imported via npm, which means less cruft in the repo. jQuery and Tabletop are the ones that aren't via npm, which is because the jQuery folks still haven't uploaded an official module to npm, and because Tabletop uses `request` in a node environment, which makes it incompatible with Browserify. Maybe one day though, they'll be able to be included via npm.

Since Sheetsee needs a build step for Browserify, I incorporated a makefile. To compile it, just run `make` in the directory, and it'll automatically Browserify and minify all the JS. If you're using Sublime, you can set your Build System to Make, then press Command-B to build. The makefile puts the outputted JS in `dist/`.

Finally, Sheetsee is ready for npm! There's a `package.json` with all the metadata and a `.npmignore` to ignore the things that aren't needed.

This is a pretty big change, so if you aren't a fan of all this, then no worries. I'm totally happy to answer any questions you might have as well. :boom: Enjoy!!

One last thing: in the `package.json`, I put the version as 2.0.0. Feel free to update that to whatever you want.