noredink-ui/BUCK

60 lines
1.3 KiB
Python
Raw Normal View History

2023-04-27 00:10:36 +03:00
# A list of available rules and their signatures can be found here: https://buck2.build/docs/api/rules/
load("@prelude-nri//:elm.bzl", "elm_docs", "elm_format_diffs")
2023-05-04 00:00:31 +03:00
load("@prelude-nri//:node.bzl", "node_modules", "npm_bin", "npm_script_test")
2023-04-27 00:10:36 +03:00
2023-04-27 01:15:52 +03:00
elm_docs(
name = "docs.json",
elm_json = "elm.json",
src = "src",
2023-04-27 00:10:36 +03:00
)
2023-04-27 01:15:52 +03:00
2023-04-27 01:22:21 +03:00
filegroup(
name = "src",
srcs = glob(["src/**/*.elm"]),
visibility = ["//component-catalog:app"],
2023-04-27 01:22:21 +03:00
)
node_modules(
name = "node_modules",
package = "package.json",
package_lock = "package-lock.json",
extra_files = {
"lib": "//lib:src"
},
2023-05-04 19:11:30 +03:00
extra_args = ["--include=dev"],
)
npm_bin(
name = "browserify",
node_modules = ":node_modules",
visibility = ["//lib:bundle.js"],
)
2023-05-02 23:59:09 +03:00
export_file(
name = "elm.json",
visibility = ["//component-catalog:public"],
)
2023-05-04 00:00:31 +03:00
npm_script_test(
name = "puppeteer",
node_modules = ":node_modules",
args = ["default", "$(location //component-catalog:public)"],
extra_files = {
"script/puppeteer-tests.sh": "script/puppeteer-tests.sh",
"script/puppeteer-tests.js": "script/puppeteer-tests.js",
},
2023-05-04 00:00:31 +03:00
)
elm_format_diffs(
name = "elm_format_diffs",
srcs = glob(["src/**/*.elm"]),
)
2023-05-05 22:51:10 +03:00
genrule(
name = "elm_format",
out = "elm_format.py",
srcs = ["elm_format.py"],
cmd = "cp $SRCS $OUT",
executable = True,
)