Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/timthedev07/distinct.css

Command line utility for finding duplicate or conflicting CSS rules either in a file or a directory. Supports detecting unused CSS based on HTML files. An awesome choice for CSS optimization with a nice command line UI.
https://github.com/timthedev07/distinct.css

cli command-line css nodejs optimization utility

Last synced: 3 days ago
JSON representation

Command line utility for finding duplicate or conflicting CSS rules either in a file or a directory. Supports detecting unused CSS based on HTML files. An awesome choice for CSS optimization with a nice command line UI.

Awesome Lists containing this project

README

        





## About

A command line app for finding and removing duplicate or conflicting css rules in a given file or directory.

## Simply

```bash
npx distinct.css
```

## Installation

Install globally:

```bash
yarn global add distinct.css
```

Install as a dev dependency for your project:

```bash
yarn add -D distinct.css
```

## Get Started

```bash
distinct.css -f [file/directory]
```

## Command Line Usage

```
Usage: distinct.css -f [path]

Options:
-f, -d, --file, --directory File/directory to check [string] [required]
-c, --showConflict Show conflicting rules [boolean] [default: false]
-r, --recursive Recursively search in a directory
[boolean] [default: true]
-u, --detectUnused Check for unused css rules. Note that if this
flag is passed, all the other ones would be
ignored since it behaves differently.
[boolean] [default: false]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]

Examples:
distinct.css -f button.css searches for duplicate css rules in file
button.css

distinct.css -rf css/ recursively searches for duplicate css
rules in the css directory

distinct.css -cf conflicts.css searches for duplicate and conflicting
css rules in conflicts.css

index.ts -u detect unused css, more information will be
prompt when command executes
```