# inlining

> Inline external CSS files referenced by `link` element to a HTML file.

Latest version **0.2.0** (published 2015-06-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

Provides the command `inlining`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2015-06-08 |
| First published | 2015-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kyo Nagashima |
| Maintainers | hail2u |
| Keywords | css, email, html |

## Links

- npm: https://www.npmjs.com/package/inlining
- Repository: https://github.com/hail2u/node-inlining
- Homepage: https://github.com/hail2u/node-inlining#readme
- Issues: https://github.com/hail2u/node-inlining/issues
- npm.io page: https://npm.io/package/inlining

## Dependencies (4)

- [mime](https://npm.io/package/mime.md) ^1.3.4
- [jsdom](https://npm.io/package/jsdom.md) ^5.4.3
- [postcss](https://npm.io/package/postcss.md) ^4.1.11
- [balanced-match](https://npm.io/package/balanced-match.md) ^0.2.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2015-06-08
- 0.1.0 — 2015-06-04

## README

Inlining
========

Inline external CSS files referenced by `link` element to a HTML file.


SYNOPSIS
--------

Sometimes we need to embed styles inline into HTML for HTML email. This package
read HTML file, extract all `<link rel="stylesheet">`, and embed inline. So, you
can write HTML email same as normal HTML document.

If you have following HTML file:

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Inlining</title>
    <link href="test.css" rel="stylesheet">
  </head>
  <body>
    <p class="test">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  </body>
</html>
```

And following CSS file:

```css
.test {
  color: green;
}
```

You will get this HTML file with this package:

```html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Inlining</title>
  </head>
  <body>
    <p class="test" style="color:green;">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  </body>
</html>
```


INSTALL
-------

    $ npm install -g inlining


USAGE
-----

    $ inlining input.html >output.html

Use single dash for reading HTML from a standard input:

    $ cat input.html | inlining - >output.html


LICENSE
-------

MIT: http://hail2u.mit-license.org/2015

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