1378: build the public portion of the component catalog r=juanedi a=BrianHicks

Builds the public portion of the component catalog with Buck.

Co-authored-by: Brian Hicks <brian@brianthicks.com>
Co-authored-by: Juan Edi <juan@noredink.com>
This commit is contained in:
noredinkbot-duet[bot] 2023-05-02 21:01:28 +00:00 committed by GitHub
commit d1cb5e4c00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

7
BUCK
View File

@ -23,5 +23,10 @@ node_modules(
npm_bin(
name = "browserify",
node_modules = ":node_modules",
visibility = ["//lib:lib.js"],
visibility = ["//lib:bundle.js"],
)
export_file(
name = "elm.json",
visibility = ["//component-catalog:public"],
)

View File

@ -10,3 +10,15 @@ elm_app(
"src": "src",
}
)
filegroup(
name = "public",
srcs = {
"index.html": "index.html",
"favicon.svg": "favicon.svg",
"bundle.js": "//lib:bundle.js",
"elm.js": ":app",
"application.json": "elm.json",
"package.json": "//:elm.json",
}
)

View File

@ -1,6 +1,7 @@
genrule(
name = "lib.js",
out = "lib.js",
name = "bundle.js",
out = "bundle.js",
srcs = glob(["**/*.js"]),
cmd = "$(exe //:browserify) index.js --outfile $OUT",
visibility = ["//component-catalog:public"],
)