Add css-browser-selector to BAZEL build file in data/web/js/vendor
This commit is contained in:
parent
bfd9c93e61
commit
ebb8171021
7
qt/aqt/data/web/js/vendor/BUILD.bazel
vendored
7
qt/aqt/data/web/js/vendor/BUILD.bazel
vendored
@ -1,6 +1,7 @@
|
||||
load("//ts:jquery.bzl", "copy_jquery")
|
||||
load("//ts:jquery-ui.bzl", "copy_jquery_ui")
|
||||
load("//ts:protobufjs.bzl", "copy_protobufjs")
|
||||
load("//ts:css-browser-selector.bzl", "copy_css_browser_selector")
|
||||
|
||||
copy_jquery(
|
||||
name = "jquery",
|
||||
@ -17,11 +18,17 @@ copy_protobufjs(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
copy_css_browser_selector(
|
||||
name = "css-browser-selector",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
|
||||
files = [
|
||||
"jquery",
|
||||
"jquery-ui",
|
||||
"protobufjs",
|
||||
"css-browser-selector",
|
||||
]
|
||||
|
||||
directories = [
|
||||
|
@ -3,14 +3,14 @@ load("//ts:copy.bzl", "copy_files")
|
||||
"Rule to copy css-browser-selector subset from node_modules to vendor folder."
|
||||
|
||||
_include = [
|
||||
"css-browser-selector.min.js",
|
||||
"css_browser_selector.min.js",
|
||||
]
|
||||
|
||||
_unwanted_prefix = "external/npm/node_modules/css-browser-selector/"
|
||||
|
||||
def _copy_browsersel(ctx):
|
||||
def _copy_css_browser_selector_impl(ctx):
|
||||
wanted = []
|
||||
for f in ctx.attr.browsersel.files.to_list():
|
||||
for f in ctx.attr.css_browser_selector.files.to_list():
|
||||
path = f.path
|
||||
want = True
|
||||
|
||||
@ -21,9 +21,9 @@ def _copy_browsersel(ctx):
|
||||
|
||||
return copy_files(ctx, wanted)
|
||||
|
||||
copy_browsersel = rule(
|
||||
implementation = _copy_browsersel_impl,
|
||||
copy_css_browser_selector = rule(
|
||||
implementation = _copy_css_browser_selector_impl,
|
||||
attrs = {
|
||||
"browsersel": attr.label(default = "@npm//css-browser-selector:css_browser-selector__files"),
|
||||
"css_browser_selector": attr.label(default = "@npm//css-browser-selector:css-browser-selector__files"),
|
||||
},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user