Socket
Book a DemoInstallSign in
Socket

parcel-plugin-interpolate-html

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-plugin-interpolate-html

Parcel plugin that interpolates ENV in HTML files

1.0.3
latest
Source
npmnpm
Version published
Weekly downloads
5
-16.67%
Maintainers
1
Weekly downloads
 
Created
Source

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>

FAQs

Package last updated on 16 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.