parcel-plugin-interpolate-html

1.0.3 • Public • Published

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>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    7
  • 1.0.1
    1
  • 1.0.0
    9

Package Sidebar

Install

npm i parcel-plugin-interpolate-html

Weekly Downloads

8

Version

1.0.3

License

none

Unpacked Size

3.12 kB

Total Files

6

Last publish

Collaborators

  • firelmnt