mgonto/restangular — pull request #18 by pauldijou (2013-04-15 22:18:10+00:00)
Title: Switching from underscore to lodash

Hi again!

I saw you were having troubles with installing lodash so here is a PR switching restangular from underscore to lodash so you can test it as soon as you can achieve to get lodash :-)

I had to rewrite a small part of restangular code since underscore and lodash don't have the exact same way of chaining (`_.chain(...)` for underscore and `_(...)` for lodash). I've gone the "uglier" way with no more chaining but at least it's compatible with both libraries. For me, it was more important than pretty code... What do you think?

At the same time, I've created a new grunt-karma task in order to test both lodash and underscore when building restangular so we can ensure that it is compatible with both. In order to do that, I had to duplicate the `karma.conf.js` file. I would have prefer a nicer solution but couldn't find one... (see https://github.com/karma-runner/grunt-karma/issues/21)

Hope you enjoy it!

PS: not sure your `prs` is the best way for PRs... since for each new PR, it will get all missing commits which have been made only on `master`... or you would need to synch both branches all the time... or something else... In this case, only the "Switch from underscore to lodash" is a real new commit.