mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-01-23 18:00:00 +00:00
20 lines
367 B
JavaScript
Executable File
20 lines
367 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
var getDependencies = require('../');
|
|
var filename = process.argv[2];
|
|
var fs = require('fs');
|
|
|
|
if (!filename) {
|
|
console.log('Filename not supplied');
|
|
console.log('Usage: detective-amd <filename>');
|
|
|
|
} else {
|
|
var deps = getDependencies(fs.readFileSync(filename));
|
|
deps.forEach(function(dep) {
|
|
console.log(dep);
|
|
});
|
|
}
|
|
|