Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: take already installed packages into account #12

Open
vitorbal opened this issue Dec 12, 2017 · 1 comment
Open

Feature request: take already installed packages into account #12

vitorbal opened this issue Dec 12, 2017 · 1 comment

Comments

@vitorbal
Copy link

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.

@stevemolitor
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants