[bazel] avoid a little boilerplate in packages (#126309)

* [bazel] avoid a little boilerplate for @types packages

* [bazel/ts] stop building sourcemaps since they're ignored
This commit is contained in:
Spencer 2022-02-24 12:43:12 -06:00 committed by GitHub
parent 6f2e49d82b
commit 614139b8e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
115 changed files with 63 additions and 402 deletions

View file

@ -4,7 +4,6 @@ load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types",
PKG_BASE_NAME = "kbn-securitysolution-list-api"
PKG_REQUIRE_NAME = "@kbn/securitysolution-list-api"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__securitysolution-list-api"
SOURCE_FILES = glob(
[
@ -75,11 +74,9 @@ ts_project(
deps = TYPES_DEPS,
args = ["--pretty"],
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
root_dir = "src",
source_map = True,
tsconfig = ":tsconfig",
)
@ -110,7 +107,7 @@ pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
package_name = PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)

View file

@ -2,12 +2,9 @@
"extends": "../../tsconfig.bazel.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "target_types",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-securitysolution-list-api/src",
"types": [
"jest",
"node"