jshttp / negotiator

An HTTP content negotiator for Node.js
MIT License
309 stars 33 forks source link

Use statically analyzable requires #33

Closed guybedford closed 9 years ago

guybedford commented 9 years ago

For #32. I've tried to keep to the existing style in maintaining the requires as data. We can potentially nest the object with name, method if you don't like the split('-') approach I'm using for extracting the name.

Thanks for consideration.

dougwilson commented 9 years ago

I think this is an OK compromise since this module wasn't lazy-loading the modules :)

guybedford commented 9 years ago

Amazing, thank you!

dougwilson commented 9 years ago

I'll make sure this change gets pulled into Express, since I saw some linked issue about trying to do something with Express which lead here.

guybedford commented 9 years ago

Thanks, that would be really great.

dougwilson commented 9 years ago

This has been published as part of 0.5.0; this means it won't make it into Express until 4.11, but that should be out within days.

dougwilson commented 9 years ago

Sorry for the delay; holidays and all in the US :) Over the past couple days I've been working on getting changes like this up through the dependency chains and into a specific Express version :) Almost complete.