require-shim
Helper for pre-processing JavaScript files as they're require()'d.
Typical Usage
If you save this as foo.js
and invoke it as node foo.js bar.js
, then it would execute bar.js
and print "Start!"
at the start of the execution of bar.js
and any other .js
files that bar.js
require()'d:
var shim = ; shim; shim;