# styledump

> returns the computed styles of a web page as JSON

Latest version **1.0.1** (published 2019-09-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install styledump
pnpm add styledump
yarn add styledump
bun add styledump
```

Provides the command `styledump`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-09-08 |
| First published | 2019-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Franz Buchinger |
| Maintainers | layoutanalysis |
| Keywords | CSS, getcomputedstyle, chrome, puppeteer, page, analysis |

## Links

- npm: https://www.npmjs.com/package/styledump
- npm.io page: https://npm.io/package/styledump

## Dependencies (4)

- [extend](https://npm.io/package/extend.md) ^3.0.2
- [commander](https://npm.io/package/commander.md) ^3.0.0
- [puppeteer](https://npm.io/package/puppeteer.md) ^1.19.0
- [known-css-properties](https://npm.io/package/known-css-properties.md) ^0.15.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-09-08
- 1.0.0 — 2019-09-08

## README

# styledump
is a command-line tool that loads a webpage URL into a [headless chrome browser](https://developers.google.com/web/updates/2017/04/headless-chrome). It then extracts the [computed CSS property values](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle) from that web page and return them as JSON. Duplicate property values are removed.

## Installation
1. Make sure you have the [Node.js](https://nodejs.org/en/) Javascript Runtime installed on your system.
2. Open a command line prompt (cmd.exe under Windows or a shell on other operating systems) and type: 

```
npm install -g styledump
```

## Usage (Command line)

```
styledump http://www.example.com > styleinfo.json
```

example output: 
```
{
    "properties": {
        "align-content": ["normal"],
        "align-items": ["normal"],
        "align-self": ["auto"],
        "alignment-baseline": ["auto"],
        "all": [""],
        "animation": ["none 0s ease 0s 1 normal none running"],
        "animation-delay": ["0s"],
        "background": ["rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box", "rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box"],
        "background-attachment": ["scroll"],
        "background-blend-mode": ["normal"],
        "background-clip": ["border-box"]
        ...
    },
    "url ": "http: //www.example.com/",
    "title": "Example Domain"
}
```

## License

ISC

---

---
_Source: https://npm.io/package/styledump · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
