This repository has been archived by the owner on Nov 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#79 path utlis
- Loading branch information
Showing
7 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {dirname, fromFileUrl} from "../../deps.ts"; | ||
|
||
/** | ||
* Get the relative (to file) working directory path from import meta. | ||
* Usage Example: | ||
* | ||
* ``` | ||
* const __dirname = rwd(import.meta) | ||
* // => ...choppa/backend/src/utils | ||
* ``` | ||
* | ||
* @param meta | ||
*/ | ||
export function rwd(meta: ImportMeta): string { | ||
return dirname(fromFileUrl(meta.url)); | ||
} | ||
|
||
/** | ||
* Get the relative filename path from import meta. | ||
* Usage Example: | ||
* | ||
* ``` | ||
* const __filename = rfn(import.meta) | ||
* // => ...choppa/backend/src/utils/path_utils.ts | ||
* ``` | ||
* | ||
* @param meta | ||
*/ | ||
export function rfn(meta: ImportMeta): string { | ||
return fromFileUrl(meta.url); | ||
} |
File renamed without changes.
11 changes: 8 additions & 3 deletions
11
backend/tests/acceptance/static_server.ts → ...nd/tests/acceptance/static_server_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"https://deno.land/std@0.63.0/_util/assert.ts": "e1f76e77c5ccb5a8e0dbbbe6cce3a56d2556c8cb5a9a8802fc9565af72462149", | ||
"https://deno.land/std@0.63.0/async/deferred.ts": "ac95025f46580cf5197928ba90995d87f26e202c19ad961bc4e3177310894cdc", | ||
"https://deno.land/std@0.63.0/async/delay.ts": "35957d585a6e3dd87706858fb1d6b551cb278271b03f52c5a2cb70e65e00c26a", | ||
"https://deno.land/std@0.63.0/async/mod.ts": "39f2602a005805dd1e6b9da4ee5391b14d15e8fec4fa5494a6165c599911d746", | ||
"https://deno.land/std@0.63.0/async/mux_async_iterator.ts": "1352b10a5cee1821a963eb8f4f05603bd7e25f8886eaf8d1888f4b416ddccdf5", | ||
"https://deno.land/std@0.63.0/async/pool.ts": "a499691231d8c249f044f69d204b479ad3af7f115e0b37342829eff076bc2450", | ||
"https://deno.land/std@0.63.0/bytes/mod.ts": "b1a149ac741728db00bda9ce1a2d044f248edd5ac95e708a6cc501bfd3adb4a7", | ||
"https://deno.land/std@0.63.0/encoding/utf8.ts": "8654fa820aa69a37ec5eb11908e20b39d056c9bf1c23ab294303ff467f3d50a1", | ||
"https://deno.land/std@0.63.0/fmt/colors.ts": "eb606cfb06e3f03a0222f09768a9701de2dd31c1fc8fa3a939137792a472962a", | ||
"https://deno.land/std@0.63.0/http/_io.ts": "a6108623563611e901b1128ca91aca02982af552aa7c4f39f2240cf6e6cd9ac7", | ||
"https://deno.land/std@0.63.0/http/http_status.ts": "0ecc0799a208f49452023b1b927106ba5a2c13cc6cf6666345db028239d554ab", | ||
"https://deno.land/std@0.63.0/http/server.ts": "9f39d814950c741e0dcf0dfb9a046515f5fb342a62fbc28607c44ac5692e8a7e", | ||
"https://deno.land/std@0.63.0/io/bufio.ts": "e76c5b7bf978a638aae6f62b87efde3ab7203b85902ce9b84ac8388c8c2bb104", | ||
"https://deno.land/std@0.63.0/testing/asserts.ts": "1e9f87e0ecc456caa00a95f3345c5a7aeea0a4bf25c443a54341d9f6e36e5edf", | ||
"https://deno.land/std@0.63.0/testing/diff.ts": "b685fb818c3527f0890628711934863672de2e94f01db421731654243f1eac8f", | ||
"https://deno.land/std@0.63.0/textproto/mod.ts": "ebd84342f62216af1850279d32581c51d0958e36d477c6c26c961987e6240356", | ||
"https://deno.land/x/rhum@v1.1.2/deps.ts": "fae73dec94d4400d25638600c2422fbe69dd220fcb9d804a8acc3e7a1570c84d", | ||
"https://deno.land/x/rhum@v1.1.2/mod.ts": "987212dacfd09330cf599e37bc9d6a6f705923d41302cc8f7344c9cccc2853a8", | ||
"https://deno.land/x/rhum@v1.1.2/src/interfaces.ts": "436a626741dc05469af55e9ce93225d026225b86cc8d0a4b4ddccb93e93f510d", | ||
"https://deno.land/x/rhum@v1.1.2/src/mock_builder.ts": "b32adad486ec63995eb73fc690c4161771bf2a2b854dfb7e89e03340e20215ad", | ||
"https://deno.land/x/rhum@v1.1.2/src/mocks/server_request.ts": "bfbada48e9b8965c97d1a177db733935ba961773000b31099b029de8b897c317", | ||
"https://deno.land/x/rhum@v1.1.2/src/rhum_asserts.ts": "05db6de3215695a615b72cadb014524ff45706c01634bc0d07bb0db9571b17aa", | ||
"https://deno.land/x/rhum@v1.1.2/src/test_case.ts": "c28798a802be705c2b5b0d1d54ed06bccdc7514912855b9ea6986321c4483644", | ||
"https://deno.land/x/rhum@v1.1.2/src/types.ts": "0426124c9411c57f45edecf207aee0c3b76606371d678688c8513e1cf6508470" | ||
} |