Nocturnal Practitioners of Magic

    polymer-weight

    1.0.3 • Public • Published

    polymer-weight 🏋

    size of imported components

    Join the chat at https://gitter.im/aruntk/polymer npm npm

    screenshot

    Installation

    npm i -g polymer-weight
    weigh --path path/to/file.html

    Options

    Path

    path to the starting file (index file)

    weigh --path path/to/file.html

    Depth

    How deep the table should show.

    eg if depth = 1. Immediate child links and the index file

    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

    • Deep Scanning of files (walk).
    • Net weight added by component and its children.
    • Standalone size (space that can be saved by removing the component)
    • Show dependency relationship in some way so that user can know which link to remove to reduce size.
    • Handle css imports. @import

    Like it?

    ⭐️ this repo

    Found a bug?

    Raise an issue!

    Install

    npm i polymer-weight

    DownloadsWeekly Downloads

    1

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • aruntk