Mercurial
annotate hg-web/BUILD @ 204:e5aed6c36672
[Notes] Added icons and updated styling a bit. Probalby usable now.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Sun, 15 Feb 2026 11:02:13 -0800 |
| parents | 9f4429c49733 |
| children |
| rev | line source |
|---|---|
|
104
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary") |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
2 load("//gui_ze:gui_ze.bzl", "move_files_into_dir", "bundle", "bun_bundle") |
|
175
71ad34a8bc9a
[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
MrJuneJune <me@mrjunejune.com>
parents:
147
diff
changeset
|
3 |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
4 # Source files |
|
176
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
5 filegroup( |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
6 name = "src_ts_files", |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
7 srcs = glob([ |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
8 "src/**/*.ts", |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
9 "src/**/*.tsx", |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
10 "src/**/*.js", |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
11 "src/**/*.jsx", |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
12 ], allow_empty = True), |
|
176
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
13 ) |
|
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
14 |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
15 # Bundle TypeScript with Bun |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
16 bun_bundle( |
|
175
71ad34a8bc9a
[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
MrJuneJune <me@mrjunejune.com>
parents:
147
diff
changeset
|
17 name = "page", |
|
71ad34a8bc9a
[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
MrJuneJune <me@mrjunejune.com>
parents:
147
diff
changeset
|
18 src = "src/main.tsx", |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
19 deps = [ |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
20 ":src_ts_files", |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
21 "//markdown_converter:markdown_to_html_wasm", |
| 191 | 22 "//third_party/highlight:js", |
|
175
71ad34a8bc9a
[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
MrJuneJune <me@mrjunejune.com>
parents:
147
diff
changeset
|
23 ], |
|
71ad34a8bc9a
[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
MrJuneJune <me@mrjunejune.com>
parents:
147
diff
changeset
|
24 visibility = ["//visibility:public"], |
|
71ad34a8bc9a
[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
MrJuneJune <me@mrjunejune.com>
parents:
147
diff
changeset
|
25 ) |
|
104
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
26 |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
27 # Prepare compiled assets |
|
104
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
28 move_files_into_dir( |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
29 name = "compiled_js", |
|
104
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
30 srcs = [ |
|
175
71ad34a8bc9a
[HgWeb] Can stream hg response now. Added react page for hg web since we use json anyway.
MrJuneJune <me@mrjunejune.com>
parents:
147
diff
changeset
|
31 ":page", |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
32 "//markdown_converter:markdown_to_html_wasm", |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
33 "//third_party/highlight:js", |
|
104
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
34 ], |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
35 dest = "src", |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
36 ) |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
37 |
|
176
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
38 move_files_into_dir( |
|
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
39 name = "public_files", |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
40 srcs = ["//mrjunejune:public_files"], |
|
176
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
41 dest = "src/public", |
|
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
42 ) |
|
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
43 |
| 193 | 44 move_files_into_dir( |
| 45 name = "public_fonts_files", | |
| 46 srcs = ["//mrjunejune:public_fonts_files"], | |
| 47 dest = "src/public/fonts", | |
| 48 ) | |
| 49 | |
|
176
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
50 filegroup( |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
51 name = "all_assets", |
| 193 | 52 srcs = glob(["src/**"]) + [":compiled_js", ":public_files", ":public_fonts_files"], |
|
176
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
53 ) |
|
fed99fc04e12
[HgWeb] Problem with the emscript lol
MrJuneJune <me@mrjunejune.com>
parents:
175
diff
changeset
|
54 |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
55 # Server binaries |
|
104
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
56 cc_binary( |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
57 name = "hg_web_server", |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
58 srcs = ["main.c"], |
|
190
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
59 deps = ["//seobeo:seobeo"], |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
60 data = [":all_assets"], |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
61 ) |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
62 |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
63 cc_binary( |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
64 name = "hg_web_server_debug", |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
65 srcs = ["main.c"], |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
66 deps = ["//seobeo:seobeo"], |
|
a2725419f988
Updated so that bun builds will with already existing js files.
MrJuneJune <me@mrjunejune.com>
parents:
188
diff
changeset
|
67 data = [":all_assets"], |
|
104
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
68 ) |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
69 |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
70 bundle( |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
71 name = "hg_web_server_bundle", |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
72 binary = ":hg_web_server", |
|
2301aeb7503b
[Hg Web] Super simple mercurial server.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
73 ) |