Mercurial
diff hg-web/BUILD @ 176:fed99fc04e12 hg-web
[HgWeb] Problem with the emscript lol
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Wed, 21 Jan 2026 19:32:08 -0800 |
| parents | 71ad34a8bc9a |
| children | 32ce881452fa |
line wrap: on
line diff
--- a/hg-web/BUILD Tue Jan 20 06:06:47 2026 -0800 +++ b/hg-web/BUILD Wed Jan 21 19:32:08 2026 -0800 @@ -1,19 +1,29 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle", "bun_build") +# External +move_files_into_dir( + name = "external_js_ts_moved", + srcs = [ + "//markdown_converter:markdown_to_html", + ], + dest = "src", +) + +filegroup( + name = "external_js_ts", + srcs = [":external_js_ts_moved"], +) + +# Internal filegroup( name = "raw_file", srcs = glob(["src/**"]), ) filegroup( - name = "src_files", - srcs = [":raw_file", ":compiled_ts"], -) - -filegroup( name = "all_ts_files", - srcs = glob([ + srcs = [":external_js_ts"] + glob([ "**/*.ts", "**/*.tsx", "**/*.js", @@ -21,6 +31,7 @@ ], allow_empty=True) ) +# Generate js file... bun_build( name = "page", src = "src/main.tsx", @@ -35,12 +46,25 @@ move_files_into_dir( name = "compiled_ts", srcs = [ - "//markdown_converter:markdown_to_html", ":page", ], dest = "src", ) +move_files_into_dir( + name = "public_files", + srcs = [ + "//mrjunejune:public_files" + ], + dest = "src/public", +) + +filegroup( + name = "src_files", + srcs = [":raw_file", ":compiled_ts", "public_files"], +) + +# Binary cc_binary( name = "hg_web_server", srcs = ["main.c"], @@ -55,7 +79,6 @@ binary = ":hg_web_server", ) - cc_binary( name = "hg_web_server_debug", srcs = ["main.c"],