@chialab/esbuild-plugin-html
Advanced tools
Comparing version 0.11.20 to 0.11.21
@@ -17,7 +17,13 @@ import path from 'path'; | ||
function commonDir(files) { | ||
const res = files.slice(1).reduce((commonDir, file) => { | ||
if (files.length === 0) { | ||
return path.sep; | ||
} | ||
if (files.length === 1) { | ||
return path.dirname(files[0]); | ||
} | ||
const res = files.slice(1).reduce((dir, file) => { | ||
const xs = file.split(path.sep); | ||
let i; | ||
for (i = 0; commonDir[i] === xs[i] && i < Math.min(commonDir.length, xs.length); i++); | ||
return commonDir.slice(0, i); | ||
for (i = 0; dir[i] === xs[i] && i < Math.min(dir.length, xs.length); i++); | ||
return dir.slice(0, i); | ||
}, files[0].split(path.sep)); | ||
@@ -24,0 +30,0 @@ |
{ | ||
"name": "@chialab/esbuild-plugin-html", | ||
"type": "module", | ||
"version": "0.11.20", | ||
"version": "0.11.21", | ||
"description": "A HTML loader plugin for esbuild.", | ||
@@ -49,3 +49,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "e446b15bcdeb67643a29630dad18c5c09396daf0" | ||
"gitHead": "118627607bb9f7f80f1e5dab9df7d03887a11137" | ||
} |
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
50825
1029