cujojs / cram

Simple, yet powerful, AMD and CommonJS module bundler.
http://cujojs.com
58 stars 9 forks source link

cram thinks the `require()`s in rest/mime/registry are global #38

Closed unscriptable closed 10 years ago

unscriptable commented 10 years ago

cram's scan module thinks the require()s in rest/mime/registry are global: https://github.com/cujojs/rest/blob/master/mime/registry.js#L116-L117

As a result, these modules are not included in the bundle.

gogamoga commented 10 years ago

And the hack-fix: https://gist.github.com/gogamoga/9541651

unscriptable commented 10 years ago

RegExp parsing code pulls in a bit extra to determine the difference between the division symbol and RegExp literals. It pulls in an extra open parenthesis with this snippet: mime.split(/[;\+]/) but didn't account for it. It now accounts for any captured parens.

gogamoga commented 10 years ago

This commit has solved the issue completely! Thanks again.