anki/ts/jquery-ui.bzl

26 lines
566 B
Python
Raw Normal View History

load("//ts:copy.bzl", "copy_select_files")
2020-12-30 11:56:20 +01:00
"Rule to copy jquery-ui subset from node_modules to vendor folder."
_include = [
"jquery-ui.min.js",
]
_unwanted_prefix = "external/npm/node_modules/jquery-ui-dist/"
def _copy_jquery_ui_impl(ctx):
return copy_select_files(
ctx,
ctx.attr.jquery_ui.files,
_include,
[],
_unwanted_prefix,
)
2020-12-30 11:56:20 +01:00
copy_jquery_ui = rule(
implementation = _copy_jquery_ui_impl,
attrs = {
2020-12-30 12:06:06 +01:00
"jquery_ui": attr.label(default = "@npm//jquery-ui-dist:jquery-ui-dist__files"),
2020-12-30 11:56:20 +01:00
},
)