Home

Awesome

node-modules-size Build Status codecov

cli to show node_modules size

list with project size

Install

npm i -g node-modules-size
node-modules-size

vue-cli project demo

demo-img

more project size like ava ...

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

<a href="https://patreon.com/yobrave"> <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50"> </a>

License

MIT © chinanf-boy