# parcel-plugin-interpolate-html

> Parcel plugin that interpolates ENV in HTML files

Latest version **1.0.3** (published 2020-11-16) · 0 weekly downloads

## Install

```sh
npm install parcel-plugin-interpolate-html
pnpm add parcel-plugin-interpolate-html
yarn add parcel-plugin-interpolate-html
bun add parcel-plugin-interpolate-html
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-11-16 |
| First published | 2018-10-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Lukáš Krotovič |
| Maintainers | firelmnt |

## Links

- npm: https://www.npmjs.com/package/parcel-plugin-interpolate-html
- Repository: https://github.com/krotovic/parcel-plugin-interpolate-html
- Homepage: https://github.com/krotovic/parcel-plugin-interpolate-html#readme
- Issues: https://github.com/krotovic/parcel-plugin-interpolate-html/issues
- npm.io page: https://npm.io/package/parcel-plugin-interpolate-html

## Dependencies (1)

- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^1.0.5

## Recent versions

- 1.0.3 (latest) — 2020-11-16
- 1.0.1 — 2019-08-26
- 1.0.0 — 2018-10-26

## README

# parcel-plugin-interpolate-html

Parcel plugin that interpolates ENV in HTML files

## Installation

`yarn add --dev parcel-plugin-interpolate-html`  
or  
`npm i -d parcel-plugin-interpolate-html`

_Attention: parcel-bundler has to be installed_

## Usage

There is no need to enable the plugin in any configuration file. If you want to use it you can do so after installing.  
You have to escape the ENV with %% around it e.g. `%example%`.

### Example

_**index.html**_

```
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>%title%</title>
  </head>
</html>
```

_**.env**_

```
title=Example
```

_**run it**_  
`parcel index.html`

_**output**_

```
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Example</title>
  </head>
</html>
```

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