comparison 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
comparison
equal deleted inserted replaced
175:71ad34a8bc9a 176:fed99fc04e12
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", "bun_build") 2 load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle", "bun_build")
3 3
4 # External
5 move_files_into_dir(
6 name = "external_js_ts_moved",
7 srcs = [
8 "//markdown_converter:markdown_to_html",
9 ],
10 dest = "src",
11 )
12
13 filegroup(
14 name = "external_js_ts",
15 srcs = [":external_js_ts_moved"],
16 )
17
18 # Internal
4 filegroup( 19 filegroup(
5 name = "raw_file", 20 name = "raw_file",
6 srcs = glob(["src/**"]), 21 srcs = glob(["src/**"]),
7 ) 22 )
8 23
9 filegroup( 24 filegroup(
10 name = "src_files",
11 srcs = [":raw_file", ":compiled_ts"],
12 )
13
14 filegroup(
15 name = "all_ts_files", 25 name = "all_ts_files",
16 srcs = glob([ 26 srcs = [":external_js_ts"] + glob([
17 "**/*.ts", 27 "**/*.ts",
18 "**/*.tsx", 28 "**/*.tsx",
19 "**/*.js", 29 "**/*.js",
20 "**/*.jsx", 30 "**/*.jsx",
21 ], allow_empty=True) 31 ], allow_empty=True)
22 ) 32 )
23 33
34 # Generate js file...
24 bun_build( 35 bun_build(
25 name = "page", 36 name = "page",
26 src = "src/main.tsx", 37 src = "src/main.tsx",
27 src_folder = "hg-web", 38 src_folder = "hg-web",
28 data = [ 39 data = [
33 ) 44 )
34 45
35 move_files_into_dir( 46 move_files_into_dir(
36 name = "compiled_ts", 47 name = "compiled_ts",
37 srcs = [ 48 srcs = [
38 "//markdown_converter:markdown_to_html",
39 ":page", 49 ":page",
40 ], 50 ],
41 dest = "src", 51 dest = "src",
42 ) 52 )
43 53
54 move_files_into_dir(
55 name = "public_files",
56 srcs = [
57 "//mrjunejune:public_files"
58 ],
59 dest = "src/public",
60 )
61
62 filegroup(
63 name = "src_files",
64 srcs = [":raw_file", ":compiled_ts", "public_files"],
65 )
66
67 # Binary
44 cc_binary( 68 cc_binary(
45 name = "hg_web_server", 69 name = "hg_web_server",
46 srcs = ["main.c"], 70 srcs = ["main.c"],
47 deps = [ 71 deps = [
48 "//seobeo:seobeo", 72 "//seobeo:seobeo",
53 bundle( 77 bundle(
54 name = "hg_web_server_bundle", 78 name = "hg_web_server_bundle",
55 binary = ":hg_web_server", 79 binary = ":hg_web_server",
56 ) 80 )
57 81
58
59 cc_binary( 82 cc_binary(
60 name = "hg_web_server_debug", 83 name = "hg_web_server_debug",
61 srcs = ["main.c"], 84 srcs = ["main.c"],
62 deps = ["//seobeo:seobeo"], 85 deps = ["//seobeo:seobeo"],
63 data = [":src_files"], 86 data = [":src_files"],