Mercurial
comparison hg-web/BUILD @ 175:71ad34a8bc9a hg-web
[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 20 Jan 2026 06:06:47 -0800 |
| parents | 6de849867459 |
| children | fed99fc04e12 |
comparison
equal
deleted
inserted
replaced
| 174:1ba8c1df082c | 175:71ad34a8bc9a |
|---|---|
| 1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary") | 1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary") |
| 2 load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle") | 2 load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle", "bun_build") |
| 3 | |
| 4 filegroup( | |
| 5 name = "raw_file", | |
| 6 srcs = glob(["src/**"]), | |
| 7 ) | |
| 8 | |
| 9 filegroup( | |
| 10 name = "src_files", | |
| 11 srcs = [":raw_file", ":compiled_ts"], | |
| 12 ) | |
| 13 | |
| 14 filegroup( | |
| 15 name = "all_ts_files", | |
| 16 srcs = glob([ | |
| 17 "**/*.ts", | |
| 18 "**/*.tsx", | |
| 19 "**/*.js", | |
| 20 "**/*.jsx", | |
| 21 ], allow_empty=True) | |
| 22 ) | |
| 23 | |
| 24 bun_build( | |
| 25 name = "page", | |
| 26 src = "src/main.tsx", | |
| 27 src_folder = "hg-web", | |
| 28 data = [ | |
| 29 "//third_party/bun:bun_files", | |
| 30 ":all_ts_files", | |
| 31 ], | |
| 32 visibility = ["//visibility:public"], | |
| 33 ) | |
| 3 | 34 |
| 4 move_files_into_dir( | 35 move_files_into_dir( |
| 5 name = "compiled_ts", | 36 name = "compiled_ts", |
| 6 srcs = [ | 37 srcs = [ |
| 7 "//markdown_converter:markdown_to_html", | 38 "//markdown_converter:markdown_to_html", |
| 39 ":page", | |
| 8 ], | 40 ], |
| 9 dest = "src", | 41 dest = "src", |
| 10 ) | |
| 11 | |
| 12 filegroup( | |
| 13 name = "src_files", | |
| 14 srcs = glob(["src/**"]) + [":compiled_ts"], | |
| 15 ) | 42 ) |
| 16 | 43 |
| 17 cc_binary( | 44 cc_binary( |
| 18 name = "hg_web_server", | 45 name = "hg_web_server", |
| 19 srcs = ["main.c"], | 46 srcs = ["main.c"], |
| 30 | 57 |
| 31 | 58 |
| 32 cc_binary( | 59 cc_binary( |
| 33 name = "hg_web_server_debug", | 60 name = "hg_web_server_debug", |
| 34 srcs = ["main.c"], | 61 srcs = ["main.c"], |
| 35 deps = ["//seobeo:seobeo_tcp_server_ws_debug"], | 62 deps = ["//seobeo:seobeo"], |
| 36 data = [":src_files"], | 63 data = [":src_files"], |
| 37 ) | 64 ) |
| 38 | 65 |