refact(NA): remove extra pkg_npm target and add specific target folders for @kbn/i18n on Bazel (#100271) (#100304)
* refact(NA): remove extra pkg_npm target and add specific target folders on @kbn/i18n * chore(NA): override the browser types Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
This commit is contained in:
parent
e36a21dd6b
commit
ef5ebb11f2
|
@ -85,10 +85,10 @@ ts_project(
|
|||
deps = DEPS,
|
||||
allow_js = True,
|
||||
declaration = True,
|
||||
declaration_dir = "types",
|
||||
declaration_dir = "target_types",
|
||||
declaration_map = True,
|
||||
incremental = True,
|
||||
out_dir = "node",
|
||||
out_dir = "target_node",
|
||||
source_map = True,
|
||||
root_dir = "src",
|
||||
tsconfig = ":tsconfig",
|
||||
|
@ -102,38 +102,16 @@ ts_project(
|
|||
allow_js = True,
|
||||
declaration = False,
|
||||
incremental = True,
|
||||
out_dir = "web",
|
||||
out_dir = "target_web",
|
||||
source_map = True,
|
||||
root_dir = "src",
|
||||
tsconfig = ":tsconfig_browser",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "tsc_types",
|
||||
srcs = [":tsc"],
|
||||
output_group = "types",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "target_files",
|
||||
srcs = [
|
||||
":tsc",
|
||||
":tsc_browser",
|
||||
":tsc_types",
|
||||
],
|
||||
)
|
||||
|
||||
pkg_npm(
|
||||
name = "target",
|
||||
deps = [
|
||||
":target_files",
|
||||
],
|
||||
)
|
||||
|
||||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = [":target"] + DEPS,
|
||||
deps = [":tsc", ":tsc_browser"] + DEPS,
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"browser": "../target/web/angular",
|
||||
"main": "../target/node/angular",
|
||||
"types": "../target/types/angular/index.d.ts"
|
||||
"browser": "../target_web/angular",
|
||||
"main": "../target_node/angular",
|
||||
"types": "../target_types/angular/index.d.ts"
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "@kbn/i18n",
|
||||
"browser": "./target/web/browser.js",
|
||||
"main": "./target/node/index.js",
|
||||
"types": "./target/types/index.d.ts",
|
||||
"browser": "./target_web/browser.js",
|
||||
"main": "./target_node/index.js",
|
||||
"types": "./target_types/index.d.ts",
|
||||
"version": "1.0.0",
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0",
|
||||
"private": true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"browser": "../target/web/react",
|
||||
"main": "../target/node/react",
|
||||
"types": "../target/types/react/index.d.ts"
|
||||
"browser": "../target_web/react",
|
||||
"main": "../target_node/react",
|
||||
"types": "../target_types/react/index.d.ts"
|
||||
}
|
|
@ -3,11 +3,12 @@
|
|||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"incremental": true,
|
||||
"outDir": "./target/web",
|
||||
"outDir": "./target_web",
|
||||
"declaration": false,
|
||||
"isolatedModules": true,
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "../../../../../packages/kbn-i18n/src"
|
||||
"sourceRoot": "../../../../../packages/kbn-i18n/src",
|
||||
"types": ["node"],
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"incremental": true,
|
||||
"declarationDir": "./target/types",
|
||||
"outDir": "./target/node",
|
||||
"declarationDir": "./target_types",
|
||||
"outDir": "./target_node",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
|
|
Loading…
Reference in a new issue