Jaguard / time-require

Displays the execution time for Node.js modules loading by hooking require() calls
MIT License
253 stars 20 forks source link

decouple from gulp #4

Closed juliangruber closed 10 years ago

juliangruber commented 10 years ago

it would be sweet to be able to run

$ time-require

without having gulp installed, none of my projects use gulp but this tool looks nevertheless useful

yields commented 10 years ago

+500 !

cyparu commented 10 years ago

time-require does not depend on gulpjs but aside of using it as a build infrastructure, also nicely fit with it (and BTW any other Liftoff based CLI tools) using the Liftoff's --require preload support. For this specific purpose I also created gulpt, a gulp CLI wrapper that automatically preload time-require. These things are already clarified under time-require's usage.

For a simple embedding into your own app(s) just simply add require("time-require"); as a first line (to pick all subsequent require() as well) into your main module so once the app is closed you'll get the nice charts. The actual configuration ( --verbose (or --V) or/and --sorted (or --s)) will be picked from the running CLI.