diff --git a/examples/no_scripts/BUILD.bazel b/examples/no_scripts/BUILD.bazel new file mode 100644 index 00000000..28ebd6f8 --- /dev/null +++ b/examples/no_scripts/BUILD.bazel @@ -0,0 +1,41 @@ +load("//:index.bzl", "prerender_pages", "web_resources_devserver") +load("//tools/jasmine:defs.bzl", "jasmine_web_test_suite") +load("//tools/typescript:defs.bzl", "ts_project") + +prerender_pages( + name = "site", + entry_point = "./site.js", + prerender = ":prerender", +) + +ts_project( + name = "prerender", + srcs = ["site.tsx"], + deps = [ + "//:node_modules/@rules_prerender/preact", + "//:node_modules/preact", + ], +) + +web_resources_devserver( + name = "devserver", + resources = ":site", +) + +ts_project( + name = "test_lib", + srcs = ["test.mts"], + testonly = True, + deps = [ + "//common/testing:devserver", + "//common/testing:webdriver", + "//:node_modules/@types/jasmine", + ], +) + +jasmine_web_test_suite( + name = "test", + browsers = ["//tools/browsers:chromium-local"], + data = [":devserver"], + deps = [":test_lib"], +) diff --git a/examples/no_scripts/README.md b/examples/no_scripts/README.md new file mode 100644 index 00000000..d4b654fe --- /dev/null +++ b/examples/no_scripts/README.md @@ -0,0 +1,5 @@ +# No scripts + +Test case which does _not_ include any client-side JavaScript. This should not +emit any errors or warnings during the build process. It also should _not_ +inject any `