Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowtime2000 committed Nov 2, 2020
1 parent c3e6e6f commit 592d48c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
25 changes: 25 additions & 0 deletions egg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://x.nest.land/eggs@0.3.1/src/schema.json",
"name": "denoname",
"entry": "./mod.ts",
"description": "A dead simple way to get dirname and other constants in Deno",
"homepage": "/~https://github.com/shadowtime2000/denoname",
"version": "0.8.2",
"releaseType": "patch",
"files": [
"./mod.ts",
"./mod/**/*.ts",
"README.md",
"LICENSE"
],
"ignore": [
".git",
"assets",
".vscode"
],
"checkFormat": "deno fmt --check",
"checkTests": "deno test --allow-env",
"checkInstallation": false,
"check": true,
"unlisted": false
}
10 changes: 5 additions & 5 deletions mod/output.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type Output = {
dirname: string;
path: string;
filename: string;
}
dirname: string;
path: string;
filename: string;
};

export type { Output };
export type { Output };
8 changes: 6 additions & 2 deletions mod/path_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Deno.test({
const __path = path(import.meta);
assert(!__path.startsWith("file:///"));
assert(/[\\|//]/.test(__path));
assertThrows(() => path({ url: "https://foo.bar", main: false }), Error, "You should not be using this in a hosted a script!");
assertThrows(
() => path({ url: "https://foo.bar", main: false }),
Error,
"You should not be using this in a hosted a script!",
);
},
});
});

0 comments on commit 592d48c

Please sign in to comment.