forked from aspect-build/rules_ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add example --config=debug settings to .bazelrc.common and exa…
…mple debuggle target with sourcemaps back to .ts sources (aspect-build#168)
- Loading branch information
1 parent
9345044
commit 6dce878
Showing
4 changed files
with
76 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "Attach nodejs_binary", | ||
"internalConsoleOptions": "neverOpen", | ||
"resolveSourceMapLocations": null | ||
} | ||
] | ||
} |
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 @@ | ||
load("@aspect_rules_ts//ts:defs.bzl", "ts_project") | ||
load("@aspect_rules_js//js:defs.bzl", "js_test") | ||
|
||
ts_project( | ||
name = "compile", | ||
srcs = ["test.ts"], | ||
tsconfig = { | ||
"compilerOptions": { | ||
"inlineSourceMap": True, | ||
}, | ||
}, | ||
) | ||
|
||
# If run with | ||
# | ||
# ``` | ||
# bazel run //examples/js_test:test --config=debug | ||
# ``` | ||
# | ||
# will start a debug session that can be connected to with Visual Studio Code. VSCode will follow | ||
# the inline source maps to the TypeScript source files (their copies in the output tree) so the | ||
# debugger will show the TypeScript sources when stepping through code. | ||
js_test( | ||
name = "test", | ||
entry_point = "test.js", | ||
) |
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,2 @@ | ||
const msg: string = '\n\n\nThis is only a test.\n\n\n' | ||
console.log(msg) |