@node-minify/core
Advanced tools
Comparing version 5.1.0 to 5.2.0
@@ -52,3 +52,3 @@ "use strict"; | ||
settings = Object.assign(settings, wildcards(settings.input, settings.publicFolder)); | ||
settings = Object.assign(settings, checkOutput(settings.input, settings.output, settings.publicFolder)); | ||
settings = Object.assign(settings, checkOutput(settings.input, settings.output, settings.publicFolder, settings.replaceInPlace)); | ||
settings = Object.assign(settings, setPublicFolder(settings.input, settings.publicFolder)); | ||
@@ -64,2 +64,3 @@ return settings; | ||
* @param {String} publicFolder - Path to the public folder | ||
* @param {Boolean} replaceInPlace - True to replace file in same folder | ||
* @return {Object} | ||
@@ -71,3 +72,3 @@ */ | ||
const checkOutput = (input, output, publicFolder) => { | ||
const checkOutput = (input, output, publicFolder, replaceInPlace) => { | ||
let reg = new RegExp('\\$1'); | ||
@@ -77,5 +78,3 @@ | ||
if (Array.isArray(input)) { | ||
const outputMin = input.map(file => { | ||
return _utils.utils.setFileNameMin(file, output, publicFolder); | ||
}); | ||
const outputMin = input.map(file => _utils.utils.setFileNameMin(file, output, replaceInPlace ? null : publicFolder, replaceInPlace)); | ||
return { | ||
@@ -86,3 +85,3 @@ output: outputMin | ||
return { | ||
output: _utils.utils.setFileNameMin(input, output, publicFolder) | ||
output: _utils.utils.setFileNameMin(input, output, replaceInPlace ? null : publicFolder, replaceInPlace) | ||
}; | ||
@@ -89,0 +88,0 @@ } |
{ | ||
"name": "@node-minify/core", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "core of @node-minify", | ||
@@ -35,7 +35,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@node-minify/utils": "^5.1.0", | ||
"@node-minify/utils": "^5.2.0", | ||
"glob": "7.1.5", | ||
"mkdirp": "0.5.1" | ||
}, | ||
"gitHead": "bfb1832dae961da38c06f118c6e30eae52e46c56" | ||
"gitHead": "57683dafd4a0de87f4b7b4d0e47f32e43a51ae42" | ||
} |
@@ -10,3 +10,2 @@ <p align="center"><img src="/static/node-minify.png" width="348" alt="node-minify"></p> | ||
<a href="https://codecov.io/gh/srod/node-minify"><img src="https://codecov.io/gh/srod/node-minify/branch/develop/graph/badge.svg"></a><br> | ||
<a href="https://travis-ci.org/srod/node-minify"><img src="https://img.shields.io/travis/srod/node-minify/master.svg?label=linux"></a> | ||
<a href="https://dev.azure.com/srodolphe/srodolphe/_build/latest?definitionId=1"><img src="https://dev.azure.com/srodolphe/srodolphe/_apis/build/status/srod.node-minify?branchName=master"></a> | ||
@@ -13,0 +12,0 @@ <a href="https://circleci.com/gh/srod/node-minify/tree/master"><img src="https://circleci.com/gh/srod/node-minify/tree/master.svg?style=shield"></a> |
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
12933
351
43
Updated@node-minify/utils@^5.2.0