# detect-unused-css

> A CLI for detect unused css from webPage or local directory.

Latest version **0.0.5** (published 2017-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install detect-unused-css
pnpm add detect-unused-css
yarn add detect-unused-css
bun add detect-unused-css
```

Provides the command `detect-unused-css`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2017-02-24 |
| First published | 2017-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | chriscai |
| Maintainers | chriscai |

## Links

- npm: https://www.npmjs.com/package/detect-unused-css
- Repository: https://github.com/caihuiji/detect-unused-css
- Homepage: https://github.com/caihuiji/detect-unused-css#readme
- Issues: https://github.com/caihuiji/detect-unused-css/issues
- npm.io page: https://npm.io/package/detect-unused-css

## Dependencies (6)

- [vue](https://npm.io/package/vue.md) ^2.1.10
- [jquery](https://npm.io/package/jquery.md) ^3.1.1
- [cheerio](https://npm.io/package/cheerio.md) ^0.22.0
- [scandal](https://npm.io/package/scandal.md) ^2.2.2
- [css-parse](https://npm.io/package/css-parse.md) *
- [underscore](https://npm.io/package/underscore.md) ^1.8.3

## Recent versions

- 0.0.5 (latest) — 2017-02-24
- 0.0.4 — 2017-02-24
- 0.0.3 — 2017-02-23
- 0.0.1 — 2017-02-23

## README

#detect-unused-css
A CLI for detect unused css from webPage or local directory.

detect-unused-css provides two utilities:
 - Webpage , fetch webpage and detect which style rule is unused.
 - Local , specify a directory css file , and use specify a directory to detect which style rule is unused.

Unsurprisingly, these two things will generate a report to help developer to remove unused style rule.


##Usage
``` sh
 npm install detect-unused-css -g

 # for webpage
 detect-unused-css -p http://www.qq.com
 
 # for local directory 
 detect-unused-css -s /home/data/usr/js  -c /home/data/usr/css/main.css 

```


##Options
- -h, --help            Show this help message and exit.
- -v, --version         Show program's version number and exit.
- -s,--searchPath       path for search
- -c,--cssFile          css for detect
- -i, --include         search include,eg: *.js,ex/**/*.js (default:*.js,*.tpl,*.html)
- -p, --webpage          detect unused css from web page,eg: http://www.qq.com/

>  if -p is set , other arguments will be ignored.

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