Tsnode support (#580)
* ts-node support. debugging is slightly wonky as vscode will not allow breakpoints in modules that aren't bundle, yet. * apparently ts-node compilerOptions.path wasn't needed? on windows I could've sworn it was. * Cleaned up tsconfig.json a bit ( moved tsnode config to own file ). Fixed breakpoints for all modules under tsnode * Removed Microsoft Corp advert * Remove one more Microsoft Corp. ad Signed-off-by: Erkin Alp Güney <erkinalp9035@gmail.com> * Added `tsnode` npm script * Added `typescript-cached-transpile` package to help improve performance Co-authored-by: Erkin Alp Güney <erkinalp9035@gmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Erkin Alp Güney
parent
57fc690457
commit
68f6fe58d5
@@ -1,6 +1,9 @@
|
||||
import { Server, traverseDirectory } from "lambert-server";
|
||||
|
||||
const DEFAULT_FILTER = /^([^\.].*)(?<!\.d)\.(js)$/;
|
||||
//if we're using ts-node, use ts files instead of js
|
||||
const extension = Symbol.for("ts-node.register.instance") in process ? "ts" : "js"
|
||||
|
||||
const DEFAULT_FILTER = new RegExp("^([^\.].*)(?<!\.d)\.(" + extension + ")$");
|
||||
|
||||
export function registerRoutes(server: Server, root: string) {
|
||||
return traverseDirectory(
|
||||
|
||||
Reference in New Issue
Block a user