-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from BrunoBernardino/feature/multiple-accounts
Multiple accounts
- Loading branch information
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