Files
.github
src
bin
keycloakify
tools
octokit-addons
NpmModuleVersion.ts
cliOptions.ts
crawl.ts
crc32.ts
deflate.ts
downloadAndUnzip.ts
getProjectRoot.ts
grant-exec-perms.ts
isInside.ts
jar.ts
logger.ts
pathJoin.ts
tee.ts
transformCodebase.ts
walk.ts
zip.ts
create-keycloak-email-directory.ts
download-builtin-keycloak-theme.ts
generate-i18n-messages.ts
link_in_test_app.ts
mockTestingResourcesPath.ts
promptKeycloakVersion.ts
tsconfig.json
lib
test
.gitattributes
.gitignore
.prettierignore
.prettierrc.json
CONTRIBUTING.md
LICENSE
README.md
package.json
renovate.json
tsproject.json
yarn.lock
keycloak_theme/src/bin/tools/pathJoin.ts

7 lines
248 B
TypeScript

export function pathJoin(...path: string[]): string {
return path
.map((part, i) => (i === 0 ? part : part.replace(/^\/+/, "")))
.map((part, i) => (i === path.length - 1 ? part : part.replace(/\/+$/, "")))
.join("/");
}