Skip to content

Commit

Permalink
Refactor file structure and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
WMXPY committed Oct 22, 2024
1 parent f0e52d5 commit 2f6b7e4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 74 deletions.
72 changes: 0 additions & 72 deletions src-old/util/path-joiner.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions src/util/path-joiner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* @author WMXPY
* @namespace FileSystem_Util
* @description Path Joiner
*/

import * as Path from "path";

export const joinStaticFilePath = (
basePath: string,
): string => {

const resolved: string = Path.resolve(basePath);
return Path.join(resolved, "collection.meta.json");
};

export const buildUrlWithScheme = (url: string): string => {

if (url.startsWith("http://") || url.startsWith("https://")) {
return url;
}

if (url.startsWith("file://")) {
return url;
}

return `file://${url}`;
};
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1734,8 +1734,8 @@ __metadata:

"@imbricate/core@file:../Imbricate/app::locator=%40imbricate%2Forigin-file-system%40workspace%3A.":
version: 3.0.0
resolution: "@imbricate/core@file:../Imbricate/app#../Imbricate/app::hash=1526ff&locator=%40imbricate%2Forigin-file-system%40workspace%3A."
checksum: 10c0/7903da5eca5dde45dafadae1b7992f3ecbc4309beee33cb893327ec5508f27201fba1e41d7812df9e6d1101ab0ba03949b0bdbd08ccb27a80e7c5857a937e284
resolution: "@imbricate/core@file:../Imbricate/app#../Imbricate/app::hash=fd9227&locator=%40imbricate%2Forigin-file-system%40workspace%3A."
checksum: 10c0/935a442301759705583b253a23fece5e4990011c483f0ce0e9e870b13e8f39078561cb1117c61b07353c6ba1aa6ba7089814075b7a20845a1582a8ce4cc071f7
languageName: node
linkType: hard

Expand Down

0 comments on commit 2f6b7e4

Please sign in to comment.