diff --git a/npm-list-linked.js b/npm-list-linked.js index 006f371..c77bf85 100755 --- a/npm-list-linked.js +++ b/npm-list-linked.js @@ -7,8 +7,8 @@ const {getLinked} = require('./get-linked'); const NODE_MODULES = 'node_modules'; function printLinked(cwd, level = 1) { - const indentation = ' '.repeat(level * 4); - const linked = getLinked(); + const indentation = ' '.repeat(level * 4) + '—'.repeat(2) + '⌲ '; + const linked = getLinked(path.join(cwd, NODE_MODULES)); if(level === 1) { if(linked.length > 0) { @@ -20,7 +20,7 @@ function printLinked(cwd, level = 1) { linked.forEach(link => { const version = fs.readJsonSync(path.join(NODE_MODULES, link, 'package.json')).version; - console.log(indentation + link, version); + console.log(indentation + link, '@' + version); printLinked(path.join(NODE_MODULES, link), level + 1); }); }