# amp-inline-critical-cli

> Inline critical-path css and load the existing stylesheets asynchronously

Latest version **0.0.5** (published 2017-06-15) · No license license · 0 weekly downloads

## Install

```sh
npm install amp-inline-critical-cli
pnpm add amp-inline-critical-cli
yarn add amp-inline-critical-cli
bun add amp-inline-critical-cli
```

Provides the command `amp-inline-critical-cli`.

## 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-06-15 |
| First published | 2017-06-15 |
| Weekly downloads | 0 |
| License | No license |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4 |
| Dependencies | 16 |
| Known vulnerabilities | 0 (+10 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrejs Gubars |
| Maintainers | n1ghtie |
| Keywords | amp, css, inline |

## Links

- npm: https://www.npmjs.com/package/amp-inline-critical-cli
- Repository: https://github.com/n1ghtie/amp-inline-css-cli
- Homepage: https://github.com/n1ghtie/amp-inline-css-cli#readme
- Issues: https://github.com/n1ghtie/amp-inline-css-cli/issues
- npm.io page: https://npm.io/package/amp-inline-critical-cli

## Dependencies (16)

- [css](https://npm.io/package/css.md) 2.2.1
- [cave](https://npm.io/package/cave.md) 2.0.0
- [meow](https://npm.io/package/meow.md) 3.7.0
- [slash](https://npm.io/package/slash.md) 1.0.0
- [lodash](https://npm.io/package/lodash.md) 4.17.4
- [reaver](https://npm.io/package/reaver.md) 2.0.0
- [cheerio](https://npm.io/package/cheerio.md) 0.22.0
- [resolve](https://npm.io/package/resolve.md) 1.3.3
- [clean-css](https://npm.io/package/clean-css.md) 4.1.3
- [get-stdin](https://npm.io/package/get-stdin.md) 5.0.1
- [uglify-js](https://npm.io/package/uglify-js.md) 3.0.9
- [fg-loadcss](https://npm.io/package/fg-loadcss.md) 1.3.1
- [detect-indent](https://npm.io/package/detect-indent.md) 5.0.0
- [indent-string](https://npm.io/package/indent-string.md) 3.1.0
- [dom-serializer](https://npm.io/package/dom-serializer.md) 0.1.0
- [normalize-newline](https://npm.io/package/normalize-newline.md) 3.0.0

## 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

- 0.0.5 (latest) — 2017-06-15
- 0.0.4 — 2017-06-15
- 0.0.3 — 2017-06-15
- 0.0.2 — 2017-06-15
- 0.0.1 — 2017-06-15

## README

# amp-inline-critical-cli

This is a project, a slight modification of an existing npm module called [inline-critical](https://github.com/bezoerb/inline-critical). All Credit for developing the original packages goes to the guys who developed *inline-critical*.

##!Important

This sole purpose of this package is to assist in developing amp webpages, that require special `<style amp-custom></style>` attibute to be valid, and not to modify any external css like `google fonts api`, or `font-awesome`

## Installation

This module is installed via npm:

``` bash
$ npm install amp-inline-css-cli
```


## CLI

Recommened usage in example below.
Works well with either `.html` or `.php` files.
```bash
amp-inline-css-cli -c /path/to/css/main.css -h /path/to/index.html > /path/to/output/index.html
```
Run `amp-inline-css-cli --help` to see the list of options.

## inline(html, styles, options?)

- `html` is the HTML you want to use to inline your critical styles, or any other styles
- `styles` are the styles you're looking to inline
- `options` is an optional configuration object
  - `minify` will minify the styles before inlining (default: true)
  - `extract` will remove the inlined styles from any stylesheets referenced in the HTML
  - `basePath` will be used when extracting styles to find the files references by `href` attributes
  - `ignore` ignore matching stylesheets when inlining.
  - `selector` defines the element used by loadCSS as a reference for inlining.

## License

No License

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