thlorenz / proxyquireify

browserify >= v2 version of proxyquire. Mocks out browserify's require to allow stubbing out dependencies while testing.
MIT License
152 stars 24 forks source link

Attempt to parse all non-JSON files #26

Closed bendrucker closed 9 years ago

bendrucker commented 9 years ago

Commit message fully explains the change and its implications as discussed in #24

bendrucker commented 9 years ago

@thlorenz How do you want to handle this? I think the way it's handled here (assume files are valid js unless they're json) is the best. Forcing users to manually add extensions to match does mean that setups that take some string and turn it into simple JS that returns a string (e.g. a sass transform) won't break. On the other hand, for alternate scripting languages, e.g. TypeScript or CoffeeScript, it still means the AST parse will fail if the transforms aren't ordered properly.

There's no harm in doing a major version bump though.

thlorenz commented 9 years ago

LGTM, let's add a huge warning to the Readme though as well.

bendrucker commented 9 years ago

You think b7a58f4253d19bd94dd5312daadc44f4387c1332 is enough?

thlorenz commented 9 years ago

I'd like it to be more in my face so to speak (people don't read entire docs ever).

Could we have a ## Warning or ## Caveats header? Or maybe ## Using proxyquireify alongside other transforms? That way we could also link it in the TOC to make it easy to find.

bendrucker commented 9 years ago

Fair enough -- how's 55caf84261073a8d176fe21c52a8fedb9b2ad54c?

thlorenz commented 9 years ago

Awesome, LGTM. Feel free to merge all this now.

bendrucker commented 9 years ago

Done, ready for a major bump

thlorenz commented 9 years ago

Published, thanks.