-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
73 lines (66 loc) · 1.36 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load("//internal:render_html.bzl", "html_pkg_tar")
pkg_tar(
name = "src",
srcs = [
"//src",
"@docs_rules_compress//:docs",
"@docs_rules_html//:docs",
"@docs_rules_quickjs//:docs",
"@docs_tools//:docs",
],
package_dir = "src",
)
SOURCE_PKGS = {
"tools": "@docs_tools//:docs",
"rules_compress": "@docs_rules_compress//:docs",
"rules_quickjs": "@docs_rules_quickjs//:docs",
"rules_html": "@docs_rules_html//:docs",
}
html_pkg_tar(
name = "dist",
srcs = SOURCE_PKGS,
package_dir = "dist",
deps = [
"//assets",
"//src:dist",
],
)
sh_binary(
name = "serve",
srcs = ["//internal:serve_html.sh"],
args = [
"$(location :dist)",
"dist/",
],
data = [":dist"],
)
pkg_tar(
name = "website",
srcs = [
":LICENSE",
":README.md",
],
package_dir = "bzlparty_website",
deps = [
":dist",
":src",
],
)
buildifier(
name = "format",
exclude_patterns = [
"./.git/*",
],
lint_mode = "fix",
mode = "fix",
)
buildifier_test(
name = "lint",
size = "small",
lint_mode = "warn",
mode = "check",
no_sandbox = True,
workspace = "//:WORKSPACE",
)