| # Copyright 2019 The Bazel Authors. All rights reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary") |
| load("@infra-sk_npm//@bazel/typescript:index.bzl", "ts_library") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| exports_files(["karma.conf.js"]) |
| |
| ts_library( |
| name = "bazel_karma_lib", |
| srcs = glob(["*.ts"]), |
| module_name = "@bazel/karma", |
| tsconfig = ":tsconfig.json", |
| deps = [ |
| "@infra-sk_npm//@types/node", |
| "@infra-sk_npm//tmp", |
| ], |
| ) |
| |
| nodejs_binary( |
| name = "karma_bin", |
| data = [ |
| ":bazel_karma_lib", |
| "@infra-sk_npm//karma", |
| "@infra-sk_npm//karma-chrome-launcher", |
| "@infra-sk_npm//karma-firefox-launcher", |
| "@infra-sk_npm//karma-mocha", |
| "@infra-sk_npm//karma-requirejs", |
| "@infra-sk_npm//karma-sourcemap-loader", |
| "@infra-sk_npm//mocha", |
| "@infra-sk_npm//requirejs", |
| "@infra-sk_npm//tmp", |
| ], |
| entry_point = "@infra-sk_npm//:node_modules/karma/bin/karma", |
| ) |