Added grunt, tests, oss conventions #12
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding grunt and the tests was easy, UMD was a pain but I made it through 😤
See the commit log for what I did, use [Show Diff Stats] to see the files. It should be rebased on your latest edits,
I left a few test cases commented out.
Tests are very editable for the future. Also when it runs it writes the values to JSON in a tmp folder, you could then easily copy the dump file and use as a new fixture. Doing this also works well with Git, as you can review your fixture updates (in the diff).
I also applied some oss standards, like having code in /lib, /bin and /vendor. I also pimped the package.json a little.
Side note: I'm not a huge fan of UMD as main code myself, it needs so much boilerplate. You could look into using TypeScript or something like browserify to make a separate AMD build from simpler code (you have grunt now so is easy to do).
I also added JSHint.. 😈