craigspaeth / nap

Compile, manage, & package stylesheets, javascripts, and javascript templates for node.js
MIT License
122 stars 33 forks source link

Don't clobber underscore #60

Closed dirkmc closed 11 years ago

dirkmc commented 11 years ago

In nap.coffee you include underscore.string in a way that clobbers underscore:

_ = require 'underscore'
_.mixin require 'underscore.string'

This causes bugs like the following: https://github.com/jashkenas/underscore/issues/1277#issuecomment-23795678

Could you change the code to do this instead?:

_.str = require 'underscore.string'
craigspaeth commented 11 years ago

I would be happy to implement this. I'll also accept a pull request if you have a solution already.

dirkmc commented 11 years ago

That's great, thanks! The solution is the line I pasted above.

craigspaeth commented 11 years ago

Just updated with a fix https://github.com/craigspaeth/nap/commit/f454b789a7ef54188ae7871de3916d0e2550a6c2 let me know if you see anything out of place.

dirkmc commented 11 years ago

Fantastic, thanks for the quick work!