json-minimizer-webpack-plugin
Advanced tools
Comparing version 3.3.0 to 4.0.0
{ | ||
"name": "json-minimizer-webpack-plugin", | ||
"version": "3.3.0", | ||
"version": "4.0.0", | ||
"description": "json minimizer plugin for Webpack", | ||
@@ -17,3 +17,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">= 12.13.0" | ||
"node": ">= 14.15.0" | ||
}, | ||
@@ -52,25 +52,25 @@ "scripts": { | ||
"devDependencies": { | ||
"@babel/cli": "^7.14.8", | ||
"@babel/core": "^7.15.0", | ||
"@babel/preset-env": "^7.15.0", | ||
"@commitlint/cli": "^15.0.0", | ||
"@commitlint/config-conventional": "^15.0.0", | ||
"@babel/cli": "^7.17.10", | ||
"@babel/core": "^7.17.10", | ||
"@babel/preset-env": "^7.17.10", | ||
"@commitlint/cli": "^17.0.0", | ||
"@commitlint/config-conventional": "^17.0.0", | ||
"@webpack-contrib/eslint-config-webpack": "^3.0.0", | ||
"babel-jest": "^27.0.6", | ||
"copy-webpack-plugin": "^9.0.1", | ||
"babel-jest": "^28.1.0", | ||
"copy-webpack-plugin": "^9.1.0", | ||
"cross-env": "^7.0.3", | ||
"del": "^6.0.0", | ||
"del-cli": "^4.0.1", | ||
"eslint": "^8.2.0", | ||
"eslint": "^8.15.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.24.0", | ||
"husky": "^7.0.1", | ||
"jest": "^27.0.6", | ||
"lint-staged": "^12.0.2", | ||
"memfs": "^3.2.2", | ||
"eslint-plugin-import": "^2.26.0", | ||
"husky": "^8.0.1", | ||
"jest": "^28.1.0", | ||
"lint-staged": "^12.4.1", | ||
"memfs": "^3.4.1", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.3.2", | ||
"prettier": "^2.6.2", | ||
"standard-version": "^9.3.1", | ||
"typescript": "^4.5.2", | ||
"webpack": "^5.50.0" | ||
"typescript": "^4.6.4", | ||
"webpack": "^5.72.1" | ||
}, | ||
@@ -77,0 +77,0 @@ "keywords": [ |
@@ -17,3 +17,3 @@ <div align="center"> | ||
This plugin uses [JSON.stringify()](https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) to minify your JSON. | ||
This plugin uses [JSON.stringify()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) to minify your JSON. | ||
@@ -25,5 +25,17 @@ ## Getting Started | ||
```console | ||
$ npm install json-minimizer-webpack-plugin --save-dev | ||
npm install json-minimizer-webpack-plugin --save-dev | ||
``` | ||
or | ||
```console | ||
yarn add -D json-minimizer-webpack-plugin | ||
``` | ||
or | ||
```console | ||
pnpm add -D json-minimizer-webpack-plugin | ||
``` | ||
Then add the plugin to your `webpack` configuration. For example: | ||
@@ -71,13 +83,17 @@ | ||
| Name | Type | Default | Description | | ||
| :-----------------------------------------: | :-------------------------------------: | :-------------------------------: | :----------------------------------------------------------------------------------------------------------------------------- | | ||
| **[`test`](#test)** | `String\|RegExp\|Array<String\|RegExp>` | `/\.json(\?.*)?$/i` | Test to match files against. | | ||
| **[`include`](#include)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to include. | | ||
| **[`exclude`](#exclude)** | `String\|RegExp\|Array<String\|RegExp>` | `undefined` | Files to exclude. | | ||
| **[`minimizerOptions`](#minimizeroptions)** | `Object` | `{ replacer: null, space: null }` | `JSON.stringify()` [options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). | | ||
- **[`test`](#test)** | ||
- **[`include`](#include)** | ||
- **[`exclude`](#exclude)** | ||
- **[`minimizerOptions`](#minimizeroptions)** | ||
### `test` | ||
Type: `String|RegExp|Array<String|RegExp>` - default: `/\.json(\?.*)?$/i` | ||
Type: | ||
```ts | ||
type test = string | RegExp | Array<string | RegExp>; | ||
``` | ||
Default: `/\.json(\?.*)?$/i` | ||
Test to match files against. | ||
@@ -100,3 +116,8 @@ | ||
Type: `String|RegExp|Array<String|RegExp>` | ||
Type: | ||
```ts | ||
type include = string | RegExp | Array<string | RegExp>; | ||
``` | ||
Default: `undefined` | ||
@@ -123,3 +144,8 @@ | ||
Type: `String|RegExp|Array<String|RegExp>` | ||
Type: | ||
```ts | ||
type exclude = string | RegExp | Array<string | RegExp>; | ||
``` | ||
Default: `undefined` | ||
@@ -146,6 +172,14 @@ | ||
Type: `Object` | ||
Type: | ||
```ts | ||
type minimizerOptions = { | ||
space?: null | string | number; | ||
replacer?: null | Function | Array<string | number>; | ||
}; | ||
``` | ||
Default: `{ replacer: null, space: null }` | ||
`JSON.stringify()` [options](https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). | ||
`JSON.stringify()` [options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). | ||
@@ -152,0 +186,0 @@ ```js |
219
20491