build: add precompiled CLI distribution
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export function normalizeSiteBase(value = '/') {
|
||||
const trimmed = value.trim();
|
||||
if (!trimmed || trimmed === '/')
|
||||
return '/';
|
||||
return `/${trimmed.replace(/^\/+|\/+$/g, '')}/`;
|
||||
}
|
||||
export function joinBase(base, ...parts) {
|
||||
const normalized = normalizeSiteBase(base);
|
||||
const suffix = parts
|
||||
.map(part => part.replace(/^\/+|\/+$/g, ''))
|
||||
.filter(Boolean)
|
||||
.join('/');
|
||||
return suffix ? `${normalized}${suffix}/` : normalized;
|
||||
}
|
||||
//# sourceMappingURL=site-base.js.map
|
||||
Reference in New Issue
Block a user