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

https://github.com/adueck/inline-css-cli

A CLI wrapper inline css through stdin - stdout
https://github.com/adueck/inline-css-cli

cli inline-css node

Last synced: about 1 month ago
JSON representation

A CLI wrapper inline css through stdin - stdout

Awesome Lists containing this project

README

          

# inline-css-cli

A simple CLI wrapper for [inline-css](https://www.npmjs.com/package/inline-css). For inlining html through stdin - stdout.

This is useful if you want to inline files from the command line, or use it programattically in non-JS environments.

### Installation

```
git clone https://github.com/adueck/inline-css-cli
cd inline-css-cli
npm install
npm link
```

### Usage

```
$ echo "p { color: red; }

Hello World

" | inline-css
```

output (to stdout)

```

Hello World


```

Want to use this programatically from a different environment but want a faster response?

### Bonus HTTP Server:

You can also run

```
node http-index.js
```

To get a http server that will inline the html you send in a http request body.

```
curl -d "p{color:red;}

Hello World

" -X POST http://localhost:8081/
```

Response:
```

Hello World


```