fatapp
v0.1.6
Published
fatapp - a dirty NPM dependency analysis tool
Downloads
13
Readme
Install:
npm install -g fatapp
Basic usage:
fatapp - a dirty NPM dependency analysis tool
====================================================================
fatapp [-s | --sort] [-n | --loads] [<filepath>]
Options:
[<path>] - 'package-lock.json' or directory an NPM project (defaults: './package-lock.json')
[-s | --sort] - sort by 'size', 'time', 'name' (defaults: 'size')
[-n | --loads] - number of times to require a NPM package for average times (defaults: 1)
[-a | --all] - include development dependencies in scanning (defaults: off)
====================================================================
File size will be the compress TGZ NPM package.
Load times are captured from a blank preload: 'node -r "express" -e ""'
WARN: This package make lazy use of 'execSync', do not use in production environments
Example Output:
By size (default):
fatapp
fatapp - scanning: './'
====================================================================
[email protected] size: 1 KB in: 113 ms
[email protected] size: 1 KB in: 70 ms
[email protected] size: 2 KB in: 72 ms
[email protected] size: 2 KB in: 71 ms
[email protected] size: 2 KB in: 71 ms
[email protected] size: 2 KB in: 76 ms
[email protected] size: 2 KB in: 78 ms
[email protected] size: 2 KB in: 67 ms
[email protected] size: 2 KB in: 105 ms
[email protected] size: 3 KB in: 69 ms
[email protected] size: 3 KB in: 84 ms
[email protected] size: 3 KB in: 82 ms
[email protected] size: 3 KB in: 68 ms
[email protected] size: 4 KB in: 71 ms
[email protected] size: 6 KB in: 77 ms
[email protected] size: 8 KB in: 80 ms
[email protected] size: 16 KB in: 87 ms
[email protected] size: 33 KB in: 142 ms
[email protected] size: 594 KB in: 73 ms
--------------------------------------------------------------------
Finished in: 2349ms
--------------------------------------------------------------------
These are TGZ compressed sizes of the whole NPM module, but
should give a relativistic idea of package weight
By require time:
fatapp -s time ./
fatapp - scanning: './'
====================================================================
[email protected] size: 3 KB in: 64 ms
[email protected] size: 1 KB in: 68 ms
[email protected] size: 4 KB in: 68 ms
[email protected] size: 2 KB in: 68 ms
[email protected] size: 2 KB in: 68 ms
[email protected] size: 3 KB in: 69 ms
[email protected] size: 3 KB in: 69 ms
[email protected] size: 2 KB in: 70 ms
[email protected] size: 2 KB in: 70 ms
[email protected] size: 594 KB in: 72 ms
[email protected] size: 6 KB in: 72 ms
[email protected] size: 2 KB in: 73 ms
[email protected] size: 3 KB in: 73 ms
[email protected] size: 2 KB in: 73 ms
[email protected] size: 8 KB in: 74 ms
[email protected] size: 1 KB in: 74 ms
[email protected] size: 2 KB in: 74 ms
[email protected] size: 33 KB in: 77 ms
[email protected] size: 16 KB in: 88 ms
--------------------------------------------------------------------
Finished in: 2145ms
--------------------------------------------------------------------
These are TGZ compressed sizes of the whole NPM module, but
should give a relativistic idea of package weight
By require name:
fatapp --sort name
fatapp - scanning: '.'
====================================================================
[email protected] size: 2 KB in: 88 ms
[email protected] size: 3 KB in: 70 ms
[email protected] size: 2 KB in: 72 ms
[email protected] size: 3 KB in: 71 ms
[email protected] size: 6 KB in: 69 ms
[email protected] size: 594 KB in: 69 ms
[email protected] size: 16 KB in: 85 ms
[email protected] size: 2 KB in: 67 ms
[email protected] size: 2 KB in: 90 ms
[email protected] size: 3 KB in: 114 ms
[email protected] size: 8 KB in: 71 ms
[email protected] size: 1 KB in: 80 ms
[email protected] size: 3 KB in: 83 ms
[email protected] size: 1 KB in: 70 ms
[email protected] size: 4 KB in: 102 ms
[email protected] size: 2 KB in: 80 ms
[email protected] size: 2 KB in: 70 ms
[email protected] size: 33 KB in: 78 ms
[email protected] size: 2 KB in: 69 ms
--------------------------------------------------------------------
Finished in: 2292ms
--------------------------------------------------------------------
These are TGZ compressed sizes of the whole NPM module, but
should give a relativistic idea of package weight
With dev dependacies:
fatapp --all ./example
Progress meter:
fatapp - scanning: './example'
====================================================================
⸨ ░░░░░░░░░░░░░░░░⸩ ⠧ Profiling 116 of 997 > [email protected]
ಠ_ಠ 997 deps w/ dev, 143 without --all
Output:
fatapp - scanning: './example'
====================================================================
[email protected] size: 303 Bytes in: 67 ms
[email protected] size: 660 Bytes in: require failed.
[email protected] size: 698 Bytes in: 70 ms
[email protected] size: 720 Bytes in: require failed.
[email protected] size: 726 Bytes in: require failed.
[email protected] size: 731 Bytes in: require failed.
[email protected] size: 737 Bytes in: require failed.
[email protected] size: 743 Bytes in: require failed.
[email protected] size: 743 Bytes in: require failed.
[email protected] size: 744 Bytes in: require failed.
[email protected] size: 745 Bytes in: require failed.
[email protected] size: 746 Bytes in: require failed.
[email protected] size: 752 Bytes in: require failed.
< reacted output >
[email protected] size: 461 KB in: require failed.
[email protected] size: 490 KB in: require failed.
[email protected] size: 495 KB in: require failed.
[email protected] size: 517 KB in: 189 ms
[email protected] size: 573 KB in: 381 ms
[email protected] size: 589 KB in: require failed.
[email protected] size: 707 KB in: require failed.
[email protected] size: 1 MB in: require failed.
[email protected] size: 2 MB in: require failed.
[email protected] size: 2 MB in: require failed.
[email protected] size: 4 MB in: 258 ms
[email protected] size: 8 MB in: require failed.
--------------------------------------------------------------------
Finished in: 100032ms
--------------------------------------------------------------------
These are TGZ compressed sizes of the whole NPM module, but
should give a relativistic idea of package weight
Note:
required failed.
is common for development depencancies, I haven't investgated why, most likely this is due to babel use. This package was written just to check a quick idea of where package weight and time is. Enjoy.