2024-04-25 16:31:00 +03:00
|
|
|
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
|
2024-09-25 19:12:21 +03:00
|
|
|
load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project")
|
|
|
|
load("@npm//:defs.bzl", "npm_link_all_packages", "npm_link_targets")
|
2024-04-25 16:31:00 +03:00
|
|
|
npm_link_all_packages(name = "node_modules")
|
|
|
|
|
2024-09-25 19:12:21 +03:00
|
|
|
ts_config(
|
|
|
|
name = "tsconfig",
|
|
|
|
src = "tsconfig.json",
|
2024-10-14 16:49:46 +03:00
|
|
|
deps = ["//:tsconfig"],
|
2024-09-25 19:12:21 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
ts_project(
|
|
|
|
name = "tsc",
|
|
|
|
composite = True,
|
|
|
|
tsconfig = ":tsconfig",
|
2024-10-02 13:30:19 +03:00
|
|
|
allow_js = True,
|
|
|
|
out_dir = "dist",
|
|
|
|
root_dir = "src",
|
2024-09-25 19:12:21 +03:00
|
|
|
resolve_json_module = True,
|
2024-10-14 16:49:46 +03:00
|
|
|
srcs = glob(["src/**/*.ts", "src/**/*.js"]) + ["src/text/english.json"],
|
2024-09-25 19:12:21 +03:00
|
|
|
deps = npm_link_targets()
|
2024-04-25 16:31:00 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
npm_package(
|
2024-09-03 18:08:11 +03:00
|
|
|
name = "pkg",
|
2024-09-25 19:12:21 +03:00
|
|
|
srcs = [
|
|
|
|
":tsc",
|
2024-10-01 23:33:48 +03:00
|
|
|
"package.json",
|
2024-10-02 13:30:19 +03:00
|
|
|
"src/config.json",
|
2024-09-25 19:12:21 +03:00
|
|
|
],
|
2024-04-25 16:31:00 +03:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|