Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

text-replace-html-webpack-plugin

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

text-replace-html-webpack-plugin - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

20

package.json
{
"name": "text-replace-html-webpack-plugin",
"version": "1.0.2",
"version": "1.0.3",
"description": "This package is intended to be used along with html-webpack-plugin. It can be used to replace text in the html file created by the html-webpack-plugin during the webpack build process. Works only wth webpack@^4",

@@ -8,4 +8,5 @@ "main": "./dist/index.js",

"test": "ava",
"coverage": "nyc ava",
"build": "babel src -d dist",
"prepare" : "npm test && npm run build"
"prepare": "npm test && npm run build"
},

@@ -29,2 +30,17 @@ "ava": {

},
"nyc": {
"check-coverage": true,
"include": [
"src/"
],
"exclude": [
"tests/"
],
"reporter": [
"text-summary",
"html"
],
"temp-directory": "./coverage-reports-tmp",
"report-dir": "./coverage-reports"
},
"repository": {

@@ -31,0 +47,0 @@ "type": "git",

@@ -5,2 +5,5 @@ # text-replace-html-webpack-plugin

[![npm version](https://badge.fury.io/js/text-replace-html-webpack-plugin.svg)](https://badge.fury.io/js/text-replace-html-webpack-plugin) ![GitHub](https://img.shields.io/github/license/rushil94/text-replace-html-webpack-plugin.svg) ![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/text-replace-html-webpack-plugin.svg)
This package is intended to be used along with html-webpack-plugin. It can be used to replace text in the html file created by the html-webpack-plugin during the webpack build process. Works only wth webpack@^4

@@ -18,2 +21,17 @@

# Options
You can pass configuration objects in the `replacementArray` to `text-replace-html-webpack-plugin`.
Allowed values are as follows
This internally uses String.prototype.replace(). See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace for more info
| Name | Type | Description |
| :---: | :---: | :--- |
| **[`regex`](#)** | `{Regular Expression}` | The Regular Expression to be used to search |
| **[`searchString`](#)** | `{String}` | The string to be search and replaced. If regex is also provided, this will be ignored |
| **[`replace`](#)** | `{String \| function}` | Replacement of searchString |
# Basic Usage

@@ -20,0 +38,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc