mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[generate/package] include react type for web packages (#128082)
This commit is contained in:
parent
a4856b47fa
commit
07cacbe799
2 changed files with 15 additions and 0 deletions
|
@ -8,6 +8,9 @@ PKG_REQUIRE_NAME = <%- json(pkg.name) %>
|
|||
SOURCE_FILES = glob(
|
||||
[
|
||||
"src/**/*.ts",
|
||||
<%_ if (pkg.web) { _%>
|
||||
"src/**/*.tsx",
|
||||
<%_ } _%>
|
||||
],
|
||||
exclude = [
|
||||
"**/*.test.*",
|
||||
|
@ -36,6 +39,9 @@ NPM_MODULE_EXTRA_FILES = [
|
|||
# "@npm//name-of-package"
|
||||
# eg. "@npm//lodash"
|
||||
RUNTIME_DEPS = [
|
||||
<%_ if (pkg.web) { _%>
|
||||
"@npm//react"
|
||||
<%_ } _%>
|
||||
]
|
||||
|
||||
# In this array place dependencies necessary to build the types, which will include the
|
||||
|
@ -50,6 +56,9 @@ RUNTIME_DEPS = [
|
|||
TYPES_DEPS = [
|
||||
"@npm//@types/node",
|
||||
"@npm//@types/jest",
|
||||
<%_ if (pkg.web) { _%>
|
||||
"@npm//@types/react"
|
||||
<%_ } _%>
|
||||
]
|
||||
|
||||
jsts_transpiler(
|
||||
|
|
|
@ -7,8 +7,14 @@
|
|||
"rootDir": "src",
|
||||
"stripInternal": false,
|
||||
"types": [
|
||||
<%_ if (pkg.web) { _%>
|
||||
"jest",
|
||||
"node",
|
||||
"react"
|
||||
<%_ } else { _%>
|
||||
"jest",
|
||||
"node"
|
||||
<%_ } _%>
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue