siddharthkp/cost-of-modules

Namespaced npm modules don't seem to be supported.

Closed this issue · 6 comments

Here's the output for a project that I'm working on:

> cost-of-modules --less --no-install

Calculating...


┌──────────────┬───────────────┬──────────┐
│ name         │ children      │ size     │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 2458          │ 1347.22M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 873           │ 1334.27M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 274           │ 1326.62M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 90            │ 1324.39M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 158           │ 1314.70M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 7             │ 1314.66M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 11            │ 1314.62M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 10            │ 1314.62M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 15            │ 1314.62M │
├──────────────┼───────────────┼──────────┤
│ @uber        │ 12            │ 1314.62M │
├──────────────┼───────────────┼──────────┤
│ + 39 modules │               │          │
├──────────────┼───────────────┼──────────┤
│ 49 modules   │ 1032 children │ 1400.34M │
└──────────────┴───────────────┴──────────┘

You are right.

Help me with this, what is the directory structure inside node_modules?

A module namespaced as @foo/bar would end up as node_modules/@foo/bar.

Thanks, that helps

I think I'll implement it tomorrow

@mattbasta Published in 0.4.0, can you give this a try?

Works great. Much appreciated!

@mattbasta Awesome! Thanks for your help 😄