blob: ae317ec5e761303fdc4d8de5e9a3dcbec24549e5 [file]
# Copyright 2017 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("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_test")
load("@build_bazel_rules_nodejs//:tools/defaults.bzl", "pkg_npm")
load("@build_bazel_rules_nodejs//packages/concatjs:index.bzl", "ts_library")
load("@build_bazel_rules_nodejs//tools/stardoc:index.bzl", "stardoc")
load("//third_party/github.com/bazelbuild/bazel-skylib:rules/copy_file.bzl", "copy_file")
package(default_visibility = ["//visibility:public"])
exports_files(
["protractor.conf.js"],
visibility = ["//packages/protractor/test:__subpackages__"],
)
bzl_library(
name = "bzl",
testonly = True,
srcs = glob(["*.bzl"]),
deps = [
"@bazel_skylib//lib:types",
"@build_bazel_rules_nodejs//:bzl",
"@build_bazel_rules_nodejs//internal/common:bzl",
"@build_bazel_rules_nodejs//internal/node:bzl",
"@io_bazel_rules_webtesting//web",
"@rules_nodejs//nodejs:bzl",
],
)
stardoc(
name = "docs",
testonly = True,
out = "README.md",
input = "//packages/protractor:index.bzl",
tags = ["fix-windows"],
deps = ["//packages/protractor:bzl"],
)
nodejs_test(
name = "test",
data = [
"README.md",
"docs_test.js",
],
entry_point = ":docs_test.js",
tags = [
"fix-windows",
],
)
ts_library(
name = "protractor",
srcs = ["protractor-utils.ts"],
data = ["package.json"],
module_name = "@bazel/protractor",
module_root = "protractor-utils",
deps = ["@npm//@types/node"],
)
copy_file(
name = "npm_version_check",
src = "//internal:npm_version_check.js",
out = ":npm_version_check.js",
)
pkg_npm(
name = "npm_package",
package_name = "@bazel/protractor",
srcs = [
"index.bzl",
"package.bzl",
"package.json",
"protractor.conf.js",
"protractor_web_test.bzl",
],
build_file_content = """exports_files(["protractor.conf.js"])""",
deps = [
":README.md",
":npm_version_check",
"//packages/protractor",
],
)