https://github.com/aruntk/polymer-weight
:snail: See which component is making the app slow.
https://github.com/aruntk/polymer-weight
import link load load-testing polymer size webcomponents
Last synced: 11 months ago
JSON representation
:snail: See which component is making the app slow.
- Host: GitHub
- URL: https://github.com/aruntk/polymer-weight
- Owner: aruntk
- License: mit
- Created: 2017-01-28T14:52:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-01T12:17:57.000Z (over 9 years ago)
- Last Synced: 2025-06-22T09:14:46.759Z (about 1 year ago)
- Topics: import, link, load, load-testing, polymer, size, webcomponents
- Language: JavaScript
- Homepage:
- Size: 526 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# polymer-weight :weight_lifting_man:
size of imported components
[](https://gitter.im/aruntk/polymer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [ ](https://www.npmjs.com/package/polymer-weight)

## Installation
```sh
npm i -g polymer-weight
weigh --path path/to/file.html
```
## Options
### Path
path to the starting file (index file)
```sh
weigh --path path/to/file.html
```
### Depth
How deep the table should show.
eg if depth = 1. Immediate child links and the index file
```sh
weigh --path path/to/file.html --depth 1
```
## Table Columns
### Standalone weight
Standalone size of the components. ie. space that can be saved by removing the component.
By default table is sorted in the descending order of standalone weight.
### Net weight
Net weight of a link.
### file size
Size of the file corresponding to a link.
More features coming. :)
## TODO
- [x] Deep Scanning of files (walk).
- [x] Net weight added by component and its children.
- [x] Standalone size (space that can be saved by removing the component)
- [x] Show dependency relationship in some way so that user can know which link to remove to reduce size.
- [ ] Handle css imports. @import
### Like it?
:star: this repo
### Found a bug?
Raise an issue!