0.0.1 • Published 4 years ago

object-size-cli v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

object-size-cli

Find out Object size by URL and selector.

Install

Global

npm install -g object-size-cli

For one project

npm install object-size-cli

Usage

Basic command line call

object-size-cli

Call with configuration

You can either specify a configuration location with the config option object-size-cli --config="path/to/config.json" or you put a .os-config.json somewhere up the tree structure.

package.json call

If you have installed this tool for the project you can reference it in your package.json in the scripts by calling node_modules/.bin/convention-commit-log [parameters]. Take a look in this projects package.json for more information.

Configuration

PropertyDescription
scenariosAn array of scenarios
viewportsAn array of viewports

Scenario

One Scenario is an Object which defines one page with its selectors.

PropertyDescription
labelA label for the scenario as a string. This will be used in the output
urlAn URL of the page as a string
selectorsAn array selector strings

Viewport

One viewport describes one resolution at which objects will be measured.

PropertyDescription
labelA label for the viewport as a string. This will be used in the output
widthBrowser width. Consider adding an amount of px (12 works currently well) for the scrollbar
heightBrowser height