global-packages
v1.0.2
Published
List global node packages
Downloads
1,465
Readme
global-packages
List global Node packages easily.
Usage
Simply install the package:
npm install --save global-packages
After that, load it:
const globalPackages = require('global-packages')
let packages
try {
packages = await globalPackages()
} catch (err) {
console.error(err)
return
}
console.log(packages)
This is how the output will look like:
[
{
name: 'args',
linked: true,
path: '/usr/local/lib/node_modules/args'
},
{
name: 'now',
linked: false,
path: '/usr/local/lib/node_modules/now'
},
{
name: 'serve',
linked: false,
path: '/usr/local/lib/node_modules/serve'
},
...
]
Contribute
- Fork this repository to your own GitHub account and then clone it to your local device
- Link the package to the global module directory:
npm link
- Transpile the source code and watch for changes:
npm start
- Within the module you want to test your local development instance of global-packages, just link it to the dependencies:
npm link global-packages
and load it!
Author
Leo Lamprecht (@notquiteleo) - ▲ZEIT