-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
34 lines (30 loc) · 821 Bytes
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
load("@npm//:defs.bzl", "npm_link_all_packages")
npm_link_all_packages(name = "node_modules")
ts_project(
name = "main",
srcs = [
"src/ActionsCache.ts",
"src/HttpServer.ts",
"src/main.ts",
],
deps = [
"//:node_modules/@actions/core",
"//:node_modules/@actions/http-client",
"//:node_modules/@types/node",
],
)
esbuild(
name = "main_bundle",
srcs = [":main"],
entry_point = "src/main.js",
minify = True,
platform = "node",
sourcemap = "external",
)
write_source_files(
name = "dist",
files = {"dist/main.js": ":main_bundle.js"},
)