New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

merge-jsons-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merge-jsons-webpack-plugin - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

1

example/webpack.config.js

@@ -35,2 +35,3 @@ /*

new MergeJsonWebpackPlugin({
"encoding":"ascii",
"output": {

@@ -37,0 +38,0 @@ "groupBy": [{

@@ -7,2 +7,3 @@ "use strict";

var _root = path.resolve(__dirname, "./");
var UTF8_ENCODING = "utf8";
var MergeJsonWebpackPlugin = (function () {

@@ -28,3 +29,8 @@ function MergeJsonWebpackPlugin(options) {

try {
entryData = fs.readFileSync(f, 'utf8');
var encoding = _this.options.encoding;
if (!encoding) {
encoding = UTF8_ENCODING;
}
console.log('encodin ', encoding);
entryData = fs.readFileSync(f, encoding);
}

@@ -31,0 +37,0 @@ catch (e) {

2

package.json
{
"name": "merge-jsons-webpack-plugin",
"description": "This plugin is used to merge json files into single json file,using glob or file names",
"version": "1.0.6",
"version": "1.0.7",
"author": {

@@ -6,0 +6,0 @@ "email": "sudharsan_tk@yahoo.co.in",

@@ -40,10 +40,9 @@ # Merge json files

````javascript
new MergeJsonWebpackPlugin({
"files": ['./jsons/file1.json',
'./jsons/file3.json',
'./jsons/file2.json'],
"output":{
"fileName":"./dist/result.json"
}
new MergeJsonWebpackPlugin({
"files": ['./jsons/file1.json',
'./jsons/file3.json',
'./jsons/file2.json'],
"output":{
"fileName":"./dist/result.json"
}
})

@@ -54,8 +53,8 @@

| Field Name | Description |
|----------------- |---------------------------------- |
| files | Array of json files to be merged |
| output.fileName | Name of merged output file |
| Field Name | Description |
|----------------- |---------------------------------- |
| files | Array of json files to be merged |
| output.fileName | Name of merged output file |
| encoding | Optional,encoding to be used default is utf-8 |

@@ -69,2 +68,3 @@ 2. **By Patterns**

new MergeJsonWebpackPlugin({
"encoding":"ascii",
"output":{

@@ -89,3 +89,3 @@ "groupBy":[

| groupBy[].fileName | output file name for the corresponding pattern. | |
| encoding | Optional,encoding to be used default is utf-8 | |

@@ -92,0 +92,0 @@ ##Sample

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