src: add -r/--require flags for preloading modules
authorAli Ijaz Sheikh <ofrobots@google.com>
Tue, 17 Feb 2015 22:37:37 +0000 (14:37 -0800)
committerRod Vagg <rod@vagg.org>
Thu, 19 Mar 2015 10:42:16 +0000 (21:42 +1100)
commit1514b8235540c3ade0e2ab2c1a3ac0b286ea736e
tree664e79dc522363644f49a311f579f59076b89762
parentf600111d82ba208ff14c1b87ab0bef6eedeff4e7
src: add -r/--require flags for preloading modules

This patch adds a command line option (-r/--require) that allows one
to provide modules on the command line that will be 'required' during
node startup. This can be useful for debugging, tracing, memory leak
analysis etc. to be preloaded without explicit changes to the user
script. The option can be repeated to preload multiple modules.

PR-URL: https://github.com/iojs/io.js/pull/881
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
doc/iojs.1
src/node.cc
src/node.js
test/fixtures/printA.js [new file with mode: 0644]
test/fixtures/printB.js [new file with mode: 0644]
test/fixtures/printC.js [new file with mode: 0644]
test/parallel/test-preload.js [new file with mode: 0644]