@node-minify/core
Advanced tools
Comparing version 4.1.2 to 5.0.0
@@ -174,3 +174,11 @@ "use strict"; | ||
_mkdirp.default.sync(file.substr(0, file.lastIndexOf('/'))); | ||
const dir = file.substr(0, file.lastIndexOf('/')); | ||
if (!dir) { | ||
return; | ||
} | ||
if (!_fs.default.statSync(dir).isDirectory()) { | ||
_mkdirp.default.sync(dir); | ||
} | ||
}; | ||
@@ -177,0 +185,0 @@ /** |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -46,3 +46,3 @@ "use strict"; | ||
settings = Object.assign(settings, wildcards(settings.input, settings.publicFolder)); | ||
settings = Object.assign(settings, checkOutput(settings.input, settings.output)); | ||
settings = Object.assign(settings, checkOutput(settings.input, settings.output, settings.publicFolder)); | ||
settings = Object.assign(settings, setPublicFolder(settings.input, settings.publicFolder)); | ||
@@ -57,2 +57,3 @@ return settings; | ||
* @param {String} output - Path to the output file | ||
* @param {String} publicFolder - Path to the public folder | ||
* @return {Object} | ||
@@ -64,3 +65,3 @@ */ | ||
function checkOutput(input, output) { | ||
const checkOutput = (input, output, publicFolder) => { | ||
let reg = new RegExp('\\$1'); | ||
@@ -71,3 +72,3 @@ | ||
const outputMin = input.map(file => { | ||
return _utils.utils.setFileNameMin(file, output); | ||
return _utils.utils.setFileNameMin(file, output, publicFolder); | ||
}); | ||
@@ -79,7 +80,7 @@ return { | ||
return { | ||
output: _utils.utils.setFileNameMin(input, output) | ||
output: _utils.utils.setFileNameMin(input, output, publicFolder) | ||
}; | ||
} | ||
} | ||
} | ||
}; | ||
/** | ||
@@ -86,0 +87,0 @@ * Handle wildcards in a path, get the real path of each files. |
{ | ||
"name": "@node-minify/core", | ||
"version": "4.1.2", | ||
"version": "5.0.0", | ||
"description": "core of @node-minify", | ||
@@ -15,3 +15,3 @@ "keywords": [ | ||
"engines": { | ||
"node": ">=6.0.0" | ||
"node": ">=8.0.0" | ||
}, | ||
@@ -36,7 +36,7 @@ "directories": { | ||
"dependencies": { | ||
"@node-minify/utils": "^4.1.2", | ||
"glob": "7.1.4", | ||
"@node-minify/utils": "^5.0.0", | ||
"glob": "7.1.5", | ||
"mkdirp": "0.5.1" | ||
}, | ||
"gitHead": "b13f16dfcac6f151c371414cf3a8a2969ff08783" | ||
"gitHead": "2655e814697ddbce46dd57e945e2a8ddfb14b151" | ||
} |
@@ -0,0 +0,0 @@ <p align="center"><img src="/static/node-minify.png" width="348" alt="node-minify"></p> |
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
13068
381
+ Added@node-minify/utils@5.3.0(transitive)
+ Addedglob@7.1.5(transitive)
- Removed@node-minify/utils@4.1.2(transitive)
- Removedglob@7.1.4(transitive)
Updated@node-minify/utils@^5.0.0
Updatedglob@7.1.5