text-replace-html-webpack-plugin
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10327
104