I'm not sure if this is outside the scope of the project or not, but a nifty feature would be if running weigh from a directory that contains a package.json file would take the dependencies declared there into account.
For example, if I am in a directory that contains a package.json that looks like this:
{
"name": "example",
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0"
}
}
And I run weigh react-wysiwyg, the output could be:
$ weigh react-wysiwyg
Approximate weight of react-wysiwyg, excluding dependencies already installed in this project:
Uncompressed: 679 kB
Minified (uglify): 166 kB
Minified and gzipped (level: default): 45 kB
This could alternatively be turned on via an option instead.
My main motivation for this would be determining how much extra filesize would a new dependency add to my project, excluding sub-dependencies that I already bundle.
I'm not sure if this is outside the scope of the project or not, but a nifty feature would be if running
weighfrom a directory that contains apackage.jsonfile would take the dependencies declared there into account.For example, if I am in a directory that contains a
package.jsonthat looks like this:{ "name": "example", "dependencies": { "react": "^16.2.0", "react-dom": "^16.2.0" } }And I run
weigh react-wysiwyg, the output could be:$ weigh react-wysiwyg Approximate weight of react-wysiwyg, excluding dependencies already installed in this project: Uncompressed: 679 kB Minified (uglify): 166 kB Minified and gzipped (level: default): 45 kBThis could alternatively be turned on via an option instead.
My main motivation for this would be determining how much extra filesize would a new dependency add to my project, excluding sub-dependencies that I already bundle.