blob: 3ccbf3999a5a12a035f1da7575dfbef8abd16a4c [file] [log] [blame] [edit]
load("//infra-sk:index.bzl", "karma_test", "sk_demo_page_server", "sk_element", "sk_element_puppeteer_test", "sk_page")
sk_demo_page_server(
name = "demo_page_server",
sk_page = ":{{.ElementName}}-demo",
)
sk_element(
name = "{{.ElementName}}",
sass_srcs = ["{{.ElementName}}.scss"],
ts_deps = [
"//:node_modules/lit",
"//infra-sk/modules/ElementSk:index_ts_lib",
"//elements-sk/modules:define_ts_lib",
],
ts_srcs = [
"{{.ElementName}}.ts",
"index.ts",
],
visibility = ["//visibility:public"],
)
sk_page(
name = "{{.ElementName}}-demo",
html_file = "{{.ElementName}}-demo.html",
scss_entry_point = "{{.ElementName}}-demo.scss",
sk_element_deps = [":{{.ElementName}}"],
ts_entry_point = "{{.ElementName}}-demo.ts",
)
sk_element_puppeteer_test(
name = "{{.ElementName}}_puppeteer_test",
src = "{{.ElementName}}_puppeteer_test.ts",
sk_demo_page_server = ":demo_page_server",
deps = [
"//:node_modules/@types/chai",
"//:node_modules/chai",
"//puppeteer-tests:util_ts_lib",
],
)
karma_test(
name = "{{.ElementName}}_test",
src = "{{.ElementName}}_test.ts",
deps = [
":{{.ElementName}}",
"//:node_modules/@types/chai",
"//:node_modules/chai",
"//infra-sk/modules:test_util_ts_lib",
],
)