Skip to content

Commit

Permalink
Updates code snippets to use ts_project() instead of ts_library().
Browse files Browse the repository at this point in the history
Refs #50.
  • Loading branch information
dgp1130 committed Jul 4, 2022
1 parent eff3acc commit b63fe19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .vscode/bazel.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
// ],
// "description": "Log output to console"
// }
"ts_library() with tests": {
"ts_project() with tests": {
"scope": "starlark",
"prefix": "ts_lib",
"prefix": "ts_proj",
"description": "Build a new TypeScript file with Jasmine tests.",
"body": [
"ts_library(",
"ts_project(",
" name = \"${1:library_name}\",",
" srcs = [\"${1}.ts\"],",
")",
"",
"ts_library(",
"ts_project(",
" name = \"${1}_test_lib\",",
" srcs = [\"${1}_test.ts\"],",
" testonly = True,",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ desired value for various parameters using <kbd>Tab</kbd> and
<kbd>Shift</kbd>+<kbd>Tab</kbd> to navigate between them. The snippet will take
care of making sure certain values match as expected.
* Typing `ts_lib` in a `BUILD.bazel` file with a filename will generate a
`ts_library()` rule for that file, a rule for its test file, and a
* Typing `ts_proj` in a `BUILD.bazel` file with a filename will generate a
`ts_project()` rule for that file, a rule for its test file, and a
`jasmine_node_test()` rule. Useful when creating a new file to auto-generate
its default `BUILD` rules.
* Typing `jas` in a TypeScript file will generate a base Jasmine setup with
Expand Down

0 comments on commit b63fe19

Please sign in to comment.