forked from bazel-contrib/rules_nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
67 lines (61 loc) · 2.35 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
package(default_visibility = ["//visibility:public"])
exports_files(["tsconfig.json"])
# Empty node_modules filegroup used for the default
# value of the node_modules attribute in nodejs_binary
# and rollup_bundle
filegroup(
name = "node_modules_none",
srcs = [],
)
npm_package(
name = "rules_nodejs_package",
srcs = [
"BUILD.bazel",
"LICENSE",
"defs.bzl",
"package.bzl",
],
# Don't replace the default 0.0.0-PLACEHOLDER for this npm_package since
# we are packaging up the packager itself and this replacement will break it
replace_with_version = "",
deps = [
"//third_party/github.com/bazelbuild/bazel-skylib:package_contents",
"//third_party/github.com/buffer-from:package_contents",
"//third_party/github.com/gjtorikian/isBinaryFile:package_contents",
"//third_party/github.com/source-map:package_contents",
"//third_party/github.com/source-map-support:package_contents",
"//internal:package_contents",
"//internal/common:package_contents",
"//internal/history-server:package_contents",
"//internal/http-server:package_contents",
"//internal/jasmine_node_test:package_contents",
"//internal/js_library:package_contents",
# TODO(alexeagle): distribute separately as @bazel/rollup
"//internal/rollup:package_contents",
"//internal/node:package_contents",
"//internal/npm_install:package_contents",
"//internal/npm_package:package_contents",
"//internal/web_package:package_contents",
"//tools:package_contents",
],
)
npm_package(
name = "local_testing_package",
testonly = 1,
# The WORKSPACE file isn't in the distribution, but is required for local_repository
srcs = ["WORKSPACE"],
packages = [":rules_nodejs_package"],
# Don't replace the default 0.0.0-PLACEHOLDER for this npm_package since
# we are packaging up the packager itself and this replacement will break it
replace_with_version = "",
)
# This artifact is published to GitHub along with each release
pkg_tar(
name = "release",
srcs = [":rules_nodejs_package"],
extension = "tar.gz",
strip_prefix = "./rules_nodejs_package",
tags = ["manual"],
)