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/
|
2023-04-27 01:15:52 +03:00
|
|
|
load("@prelude-nri//:elm.bzl", "elm_docs")
|
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",
|
2023-04-28 00:49:50 +03:00
|
|
|
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"]),
|
2023-05-02 16:48:58 +03:00
|
|
|
visibility = ["//component-catalog:app"],
|
2023-04-27 01:22:21 +03:00
|
|
|
)
|
2023-05-01 22:56:57 +03:00
|
|
|
|
|
|
|
node_modules(
|
|
|
|
name = "node_modules",
|
|
|
|
package = "package.json",
|
|
|
|
package_lock = "package-lock.json",
|
2023-05-03 23:51:17 +03:00
|
|
|
extra_files = {
|
|
|
|
"lib": "//lib:src"
|
|
|
|
},
|
2023-05-04 19:11:30 +03:00
|
|
|
extra_args = ["--include=dev"],
|
2023-05-01 22:56:57 +03:00
|
|
|
)
|
2023-05-02 13:57:56 +03:00
|
|
|
|
|
|
|
npm_bin(
|
|
|
|
name = "browserify",
|
|
|
|
node_modules = ":node_modules",
|
2023-05-02 14:12:19 +03:00
|
|
|
visibility = ["//lib:bundle.js"],
|
2023-05-02 13:57:56 +03:00
|
|
|
)
|
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)"],
|
2023-05-05 01:10:21 +03:00
|
|
|
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
|
|
|
)
|