Skip to content

Instantly share code, notes, and snippets.

@airportyh
Created February 5, 2014 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save airportyh/8831028 to your computer and use it in GitHub Desktop.
Save airportyh/8831028 to your computer and use it in GitHub Desktop.
var start = new Date().getTime()
timestamp = function timestamp(msg){
var end = new Date().getTime()
console.log('[' + (end - start) + 'ms]', msg)
}
var mine = require('js-linker/mine.js');
var fs = require('fs');
timestamp('loaded modules')
timestamp('start')
var filename = process.argv[2];
var src = fs.readFileSync(filename) + '';
timestamp('read file')
var requires = mine(src);
timestamp('end')
console.log(requires);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment