sourcegraph/client/template-parser/BUILD.bazel
Jason Bedard 10aefc4bb7
bazel: add bazel build,tests for client/* (#46193)
Webpack bundles compile but need further testing. Jest + mocha tests
compile but are marked as `manual` until further work is done to get them
passing. The four jest tests are green and enabled now, though.

## Test plan

`bazel build //client/...` and `bazel test //client/...`
2023-02-28 20:46:03 -08:00

48 lines
1008 B
Python

load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//dev:defs.bzl", "npm_package", "ts_project")
npm_link_all_packages(name = "node_modules")
ts_config(
name = "tsconfig",
src = "tsconfig.json",
visibility = ["//client:__subpackages__"],
deps = [
"//:tsconfig",
],
)
ts_project(
name = "template-parser_lib",
srcs = [
"src/expr/evaluator.ts",
"src/expr/index.ts",
"src/expr/lexer.ts",
"src/expr/parser.ts",
"src/index.ts",
"src/types.ts",
],
tsconfig = ":tsconfig",
)
ts_project(
name = "template-parser_tests",
testonly = True,
srcs = [
"src/expr/evaluator.test.ts",
"src/expr/lexer.test.ts",
"src/expr/parser.test.ts",
],
tsconfig = ":tsconfig",
deps = [":template-parser_lib"],
)
npm_package(
name = "template-parser_pkg",
srcs = [
"package.json",
":template-parser_lib",
],
)