Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krotovic/parcel-plugin-interpolate-html
Parcel plugin that interpolates ENV in HTML files
https://github.com/krotovic/parcel-plugin-interpolate-html
Last synced: 2 months ago
JSON representation
Parcel plugin that interpolates ENV in HTML files
- Host: GitHub
- URL: https://github.com/krotovic/parcel-plugin-interpolate-html
- Owner: krotovic
- License: mit
- Created: 2018-10-26T08:13:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T01:48:07.000Z (about 2 years ago)
- Last Synced: 2024-11-06T21:19:23.807Z (3 months ago)
- Language: JavaScript
- Size: 1.14 MB
- Stars: 14
- Watchers: 0
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-parcel - HTML Interpolation - Interpolation plugin that gives you option to use your .env variable inside HTML (Plugins / Other)
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**_
```
%title%
```
_**.env**_
```
title=Example
```_**run it**_
`parcel index.html`_**output**_
```
Example
```