Get unlimited public & private packages + team-based management with npm Teams.Learn more »

node-modules-size

0.1.1 • Public • Published

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

License

MIT © chinanf-boy

Install

npm i node-modules-size

DownloadsWeekly Downloads

11

Version

0.1.1

License

MIT

Unpacked Size

8.83 kB

Total Files

5

Last publish

Collaborators

  • avatar