# combohtml

> Combo your HTML files, make scripts(.js) and stylesheets(.css) inline.

Latest version **1.3.0** (published 2018-07-06) · MIT license · 0 weekly downloads

## Install

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

Provides the command `combohtml`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2018-07-06 |
| First published | 2016-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=4 |
| Dependencies | 8 |
| Unpacked size | 22.9 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | mingelz |
| Maintainers | mingelz |
| Keywords | combo, mutiple, cli, inline, source, inline-source, inliner |

## Links

- npm: https://www.npmjs.com/package/combohtml
- Repository: https://github.com/mingelz/combohtml
- Homepage: https://github.com/mingelz/combohtml#readme
- Issues: https://github.com/mingelz/combohtml/issues
- npm.io page: https://npm.io/package/combohtml

## Dependencies (8)

- [csso](https://npm.io/package/csso.md) ^3.2.0
- [glob](https://npm.io/package/glob.md) ^7.1.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.2
- [request](https://npm.io/package/request.md) ^2.81.0
- [commander](https://npm.io/package/commander.md) ^2.11.0
- [uglify-js](https://npm.io/package/uglify-js.md) ^3.1.1
- [html-minifier](https://npm.io/package/html-minifier.md) ^3.5.5

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2018-07-06
- 1.2.0 — 2017-10-16
- 1.1.2 — 2017-10-10
- 1.1.1 — 2017-10-10
- 1.1.0 — 2017-10-09
- 1.0.1 — 2017-09-22
- 1.0.0 — 2017-09-19
- 0.1.0 — 2016-08-31

## README

# ComboHTML

[![Version](https://img.shields.io/npm/v/combohtml.svg?style=flat)](https://www.npmjs.com/package/combohtml)

Combo your HTML files, make scripts(.js) and stylesheets(.css) inline.

## Quick start

There are 3 directives: `inline`, `compress`, `remove`, and support all HTML tags.

* if the tag is `<link>`, `<style>`, or `<script>`, it's accepted all 3 directives,
* otherwise it's accepted `compress` and `remove`

```html
<!-- inline remote file only -->
<link data-combohtml="inline" rel="stylesheet" href="//example.com/index.css">

<!-- inline and compress local file -->
<script data-combohtml="inline,compress" src="./index.js"></script>

<!-- compress inline code -->
<style data-combohtml="compress">
  div {
    color: #000;
  }
</style>
<script data-combohtml="compress">
  function test (whatever) {
    var one = 1
    return one + whatever
  }
</script>

<!-- remove test/mock tag -->
<script data-combohtml="remove">
  mock = "the mock data in development environment"
</script>

<!-- compress html, maybe you'd like to add the directive to `<html>` or `<body>` tag -->
<div data-combohtml="compress">
  whatever...
</div>
```

## Install

First, make sure your Node.js `>= 4`.

```shell
npm install combohtml
```

## Command line usage

```shell
# process specified file
combohtml -i index.html -o dist.html

# process mutiple files
combohtml --input 'src/**/*.html' --output dist
```

### Command line options

```shell
-i, --input <input>    Input file(s)
-o, --output <output>  Output directory or file name
-r, --root [root]      Files root path,
                       default to current working directory (process.cwd())
-a, --attr [attr]      Specified attribute,
                       default to "data-combohtml"
```

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