rollup-plugin-merge
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -29,3 +29,3 @@ const fs = require('fs'); | ||
module.exports = ({ input, output, watch = false, verbose = false, recursive = false }) => { | ||
module.exports = ({ input, output, watch = false, verbose = false, recursive = false, prettify = false }) => { | ||
const run = async () => { | ||
@@ -38,3 +38,3 @@ try { | ||
createDirIfNotExist(output); | ||
await writeFileAsync(output, JSON.stringify(mergeFn(...files.map(i => JSON.parse(i))), null, ' ')); | ||
await writeFileAsync(output, JSON.stringify(mergeFn(...files.map(i => JSON.parse(i))), null, prettify ? ' ' : '')); | ||
@@ -41,0 +41,0 @@ if (verbose) { |
{ | ||
"name": "rollup-plugin-merge", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Rollup plugin to merge JSON files", | ||
@@ -27,8 +27,8 @@ "main": "index.js", | ||
"dependencies": { | ||
"chokidar": "3.0.2", | ||
"colors": "1.3.3", | ||
"merge": "1.2.1" | ||
"chokidar": "3.5.1", | ||
"colors": "1.4.0", | ||
"merge": "2.1.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^6.0.1" | ||
"eslint": "^7.18.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "scripts": { |
@@ -30,2 +30,3 @@ # rollup-plugin-merge | ||
recurisve: true, | ||
prettify: true | ||
}) | ||
@@ -40,1 +41,2 @@ ] | ||
- watch (default is `false`). Enable/disable watching. If disabled then copy only on start | ||
- prettify (default is `false`). Enable/disable prettify. If enabled then insert white space into the output JSON string for readability purposes |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
4721
41
+ Addedchokidar@3.5.1(transitive)
+ Addedcolors@1.4.0(transitive)
+ Addedmerge@2.1.0(transitive)
+ Addedreaddirp@3.5.0(transitive)
- Removedchokidar@3.0.2(transitive)
- Removedcolors@1.3.3(transitive)
- Removedmerge@1.2.1(transitive)
- Removedreaddirp@3.6.0(transitive)
Updatedchokidar@3.5.1
Updatedcolors@1.4.0
Updatedmerge@2.1.0