blue-button/bluebutton.js — pull request #39 by robdodson (2013-05-27 20:24:17+00:00)
Title: Grunt

Not ready to be merged in just yet :D

I wanted to open this PR so you could give me your feedback on the changes. To get started you can clone my branch and run `$ npm install && grunt`. If you've already run `npm install` then you can just run `grunt` to do the default build or `grunt test` to do the default build and run the jasmine suite. The jasmine tests run in [phantomjs](http://phantomjs.org/) so you'll want to make sure you have that installed.

TODO:

- [ ] settle on naming convention for built js files.
- [ ] give verdict on new bluebutton.html and sample_data stuff in `build/`
- [ ] copy items over to docs_server
- [ ] add jshint

Experimenting with filenames a bit, I made it so the output is now just `bluebutton.js` and `bluebutton.min.js`. I was thinking that since we have a `package.json`, version numbers can be maintained in that file instead of needing to be appended to the built js files. If we're tagging the repo at each release then whatever is checked into the build folder will be be our archived instance of bluebutton for said version. Also, bower and npm will look at our package.json and use that to resolve the version by pulling down a matching tag. Thoughts on losing `-latest` and `-x.x.x` in favor of `bluebutton.js` and `bluebutton.min.js`?

Also I redid the One Pager from the Rakefile but I modified it so it just loads the bluebutton.js and xml using a script tag and xhr. To do so meant copying over the `sample_data` into the `build` folder. At first that seemed weird to me, but then I started to think that it might actually be useful for folks. If they wanted to mess around with that file they could pretty easily switch which xml is being loaded. I noticed the One Pager is also copied over to the `docs_server` and I thought that might be why you chose to bake the xml and js into that file. So I could bake everything in or we could just copy the entire build folder to the docs server?

Still need to add jshint, but that shouldn't take too long. I just need to put together the `.jshintrc` file.

I also started work on the UMD stuff, but I was going to save that for another PR.