node-modules-size
v0.1.1
Published
cli to show node_modules size
Downloads
3
Maintainers
Readme
node-modules-size
cli to show node_modules size
Install
npm i -g node-modules-size
node-modules-size
vue-cli project demo
Usage
const nodeModulesSize = require('node-modules-size');
let res = await nodeModulesSize();
//=> {"node_modules - path-name": "number-size", //.. , "total":"size"}
you can use module(
pretty-bytes
) to convert the number-size to human(kB) size.
API
nodeModulesSize(cwd, options)
cwd
name: | cwd
---------|----------
Type: | string
Default: | process.cwd()
Desc: | dir context
options
match
name: | match
---------|----------
Type: | string
|Array
Default: | *node_modules
Desc: | match path use Array.prototype.every
ignore
name: | ignore
---------|----------
Type: | string
|Array
Default: | *.git
Desc: | ignore path use Array.prototype.some
CLI
npm install --global node-modules-size
$ node-modules-size --help
Usage
node-modules-size [cwd] [Options]
Options
-P default:<process.cwd()> select and picture save
{ use bash:"screencapture -W -P" select and save the picture}
-m match : < *node_modules >
{ -m "*node_modules,*" match is Array.prototype.every for path cover options}
-i ignore : < *.git >
{ -i "*.git" ignore is Array.prototype.some for path cover options}
use
- two-log 我只需要两种信息输出方式
- what-time human readable time
- get-module-name just get process.cwd around package.json name
- get-node-modules-rust use Rust power, search the Given dir of all node_modules folder.
License
MIT © chinanf-boy