# wrap-html

> Wraps one html file in another html file. Like an html pig in a html blanket.

Latest version **0.0.0** (published 2015-03-02) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install wrap-html
pnpm add wrap-html
yarn add wrap-html
bun add wrap-html
```

Provides the command `wrap-html`.

## 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.0 |
| Published | 2015-03-02 |
| First published | 2015-03-02 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nikolas Wise |
| Maintainers | nikolaswise |
| Keywords | html, templates, partials, pigs |

## Links

- npm: https://www.npmjs.com/package/wrap-html
- Repository: https://github.com/nikolaswise/wrap-html
- Issues: https://github.com/nikolaswise/wrap-html/issues
- npm.io page: https://npm.io/package/wrap-html

## Dependencies (4)

- [glob](https://npm.io/package/glob.md) ~4.4.1
- [yargs](https://npm.io/package/yargs.md) ~3.4.5
- [mkdirp](https://npm.io/package/mkdirp.md) ~0.5.0
- [cli-color](https://npm.io/package/cli-color.md) ~0.3.2

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.0.0 (latest) — 2015-03-02

## README

# wrap-html

> A lightweight command line utility to wrap html files in a common layout.

# Install

```
npm install wrap-html
```

# Use

Use the cli by passing in a directory of html files to process. Optionally pass in an output directory, and a template to use.

Recommended to use with npm scripts like so:

```
  "scripts": {
	"wrap-html": "wrap-html sourceDir -o buildDir -t templateFile.html"
  }
```

Then you can use `npm run wrap-html` to build everything.

```
Wraps html in another html file.
Usage: wrap-html [source dir] [options]

Options:
  -o, --output    Output directory
  -t, --template  template html file
  -d, --debug     log all files built
  -h, --help      Show help

Examples:
  wrap-html source -t template.html -o        wrap all files in ./source inside
  build                                       template.html and save them in
                                              the build folder
```

### Templates

The template html file (the one that will be wrapped around all of the other files) needs to have `{{ content }}` in the file. For example, to wrap all the html files in a basic html skeleton, you could use:

```html
<!DOCTYPE html>
  <head>
    <title>Layers</title>
  </head>
  <body>
    {{ content }}
  </body>
</html>
```

** Note: the layout is assumed to be inside your source directory. **

### Defaults

| option | default |
| ------ | ------- |
| source | 'source' |
| output | 'build' |
| template | 'layout.html' |
| debug | false |

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