-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements a simple account switcher and a way to change/add accounts. To remove one, you have to logout from all of them. It makes sharing family accounts easier, while keeping separate accounts/tracking per person.
- Loading branch information
1 parent
d6bb84c
commit 90004d3
Showing
12 changed files
with
189 additions
and
19 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import 'std/dotenv/load.ts'; | ||
import { emit } from 'https://deno.land/x/emit@0.15.0/mod.ts'; | ||
import { transpile } from 'https://deno.land/x/emit@0.33.0/mod.ts'; | ||
import sass from 'https://deno.land/x/[email protected]/mod.ts'; | ||
import { serveFile } from 'std/http/file_server.ts'; | ||
|
||
|
@@ -106,15 +106,15 @@ export function escapeHtml(unsafe: string) { | |
|
||
async function transpileTs(content: string, specifier: URL) { | ||
const urlStr = specifier.toString(); | ||
const result = await emit(specifier, { | ||
const result = await transpile(specifier, { | ||
load(specifier: string) { | ||
if (specifier !== urlStr) { | ||
return Promise.resolve({ kind: 'module', specifier, content: '' }); | ||
} | ||
return Promise.resolve({ kind: 'module', specifier, content }); | ||
}, | ||
}); | ||
return result[urlStr]; | ||
return result.get(urlStr) || ''; | ||
} | ||
|
||
export async function serveFileWithTs(request: Request, filePath: string, extraHeaders?: ResponseInit['headers']) { | ||
|
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
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