Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f9adaa4

Browse files
committed
- re-added note on CoffeeScript jhnns#8 (since require.extensions seems to stay - though it's bad practice in production code)
1 parent dcd9502 commit f9adaa4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ rewire adds a special setter and getter to modules so you can modify their behav
88
- leak private variables
99
- override variables within the module.
1010

11-
rewire does **not** load the file and eval the contents to emulate node's require mechanism. In fact it uses node's own require to load the module. Thus your module behaves exactly the same in your test environment as under regular circumstances (except your modifications).
11+
rewire does **not** load the file and eval the contents to emulate node's require mechanism. In fact it uses node's own
12+
require to load the module. Thus your module behaves exactly the same in your test environment as under regular
13+
circumstances (except your modifications).
14+
15+
Good news to all caffeine-addicts: rewire works also with [Coffee-Script](http://coffeescript.org/). Note that in this
16+
case CoffeeScript needs to be listed in your devDependencies.
1217

1318
If you want to use rewire also on the client-side take a look at [client-side bundlers](https://github.com/jhnns/rewire#client-side-bundlers)
1419

0 commit comments

Comments
 (0)