[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

@ -5,7 +5,6 @@ load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types",
PKG_BASE_NAME = "kbn-ui-shared-deps-npm"
PKG_REQUIRE_NAME = "@kbn/ui-shared-deps-npm"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__ui-shared-deps-npm"
SOURCE_FILES = glob(
[
@ -121,11 +120,9 @@ ts_project(
deps = TYPES_DEPS,
allow_js = True,
declaration = True,
declaration_map = True,
emit_declaration_only = True,
out_dir = "target_types",
root_dir = "src",
source_map = True,
tsconfig = ":tsconfig",
)
@ -174,7 +171,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

@ -3,12 +3,9 @@
"compilerOptions": {
"allowJs": true,
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "./target_types",
"rootDir": "src",
"sourceMap": true,
"sourceRoot": "../../../../packages/kbn-ui-shared-deps-npm/src",
"types": [
"node",
]