npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

dep-cli

1.0.2 • Public • Published

dep-cli v1.0.0

Build Status

Get the information of dependencies in a npm package.json.

To create this repository I have forked this project and make some edit:

https://www.npmjs.org/package/package-info

The information that you can retrieve are:

  • package name
  • package version
  • package description
  • package license
  • package homepage
  • package author name

Used for node program

It will only get only one package info.

$ npm install --save dep-cli
const info = require('dep-cli');
 
(async () => {
    console.log(await info('dep-cli'));
})();

used for command line

It will get the dependency information in package.json under the current directory, or you can enter the absolute path of package.json.

$ npm install --global dep-cli
$ dep-cli --help
 
Usage
  $ dep-cli [package-path]
 
Example
  $ cd /Users/tangwenyong/Documents/yourProject
  $ dep-cli
 
  or
  $ dep-cli /Users/tangwenyong/Documents/yourProject/package.json

It will prints:

===== mocha =====
name : mocha
version : 5.2.0
description : simple, flexible, fun test framework
license : MIT
homepage : https://mochajs.org
author : TJ Holowaychuk
total dependencies: 1

License

The MIT License (MIT)

Copyright (c) 2014 唐文雍

install

npm i dep-cli

Downloadsweekly downloads

2

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability