# beautify-css

> make your CSS pretty

Latest version **1.0.0** (published 2015-02-23) · CC0 license · 0 weekly downloads

## Install

```sh
npm install beautify-css
pnpm add beautify-css
yarn add beautify-css
bun add beautify-css
```

Provides the command `beautify-css`.

## 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.0 |
| Published | 2015-02-23 |
| First published | 2015-02-23 |
| Weekly downloads | 0 |
| License | CC0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shawn Allen |
| Maintainers | shawnbot |
| Keywords | css, format, beautify |

## Links

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

## Dependencies (3)

- [rw](https://npm.io/package/rw.md) ^0.1.4
- [css](https://npm.io/package/css.md) ^2.2.0
- [yargs](https://npm.io/package/yargs.md) ^3.2.1

## 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.0 (latest) — 2015-02-23

## README

# beautify-css
beautify-css is a command-line CSS beautifier that uses [the css npm module](https://www.npmjs.com/package/css) to parse and format valid CSS.

You can install it with `npm install [-g] beautify-css`.

## Usage
```
beautify-css [options] [input] [output]

Options:
  --indent, -i    indent with this number of spaces (or string)    
  --encoding, -e  string encoding (default: "utf8")                
  --compress, -c  compress output, removing whitespace and comments
  --source-map    generate a source map, and write it to this file 
  --source-in     reference one or more input source maps          
  --in-place, -p  modify the input file in place                   
  -v              output helpful debugging messages                
```

Some examples:

```sh
# read from and write to files
beautify-css ugly.css pretty.css

# or you can use the --in-place/-p to overwrite the file
# (remember to back it up or check it in first!)
beautify-css -p style.css

# read ugly css from stdin, write to a filename
echo 'body{margin:0}' | beautify-css - pretty.css
# or redirect stdout to a file
echo 'body{margin:0}' | beautify-css > pretty.css

# pipe pretty css to another tool, such as
# myth: <https://github.com/segmentio/myth>
echo 'body{margin:0}' | beautify-css | myth > beautiful.css
```

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