-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* chore(NA): moving @kbn/es into bazel * chore(NA): remove build scripts from pkg json Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
- Loading branch information
1 parent
bfaba0b
commit 1152586
Showing
10 changed files
with
104 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@kbn/babel-preset/node_preset"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") | ||
load("@npm//@babel/cli:index.bzl", "babel") | ||
|
||
PKG_BASE_NAME = "kbn-es" | ||
PKG_REQUIRE_NAME = "@kbn/es" | ||
|
||
SOURCE_FILES = glob( | ||
[ | ||
"src/**/*", | ||
], | ||
exclude = [ | ||
"**/*.test.*", | ||
"**/integration_tests/**", | ||
"**/__fixtures__/**", | ||
], | ||
) | ||
|
||
SRCS = SOURCE_FILES | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = SRCS, | ||
) | ||
|
||
NPM_MODULE_EXTRA_FILES = [ | ||
"package.json", | ||
"README.md", | ||
] | ||
|
||
DEPS = [ | ||
"//packages/kbn-babel-preset", | ||
"@npm//@elastic/elasticsearch", | ||
"@npm//abort-controller", | ||
"@npm//chalk", | ||
"@npm//dedent", | ||
"@npm//del", | ||
"@npm//execa", | ||
"@npm//getopts", | ||
"@npm//glob", | ||
"@npm//node-fetch", | ||
"@npm//simple-git", | ||
"@npm//tar-fs", | ||
"@npm//tree-kill", | ||
"@npm//yauzl", | ||
"@npm//zlib" | ||
] | ||
|
||
babel( | ||
name = "target", | ||
data = [ | ||
":srcs", | ||
".babelrc", | ||
] + DEPS, | ||
output_dir = True, | ||
# the following arg paths includes $(execpath) as babel runs on the sandbox root | ||
args = [ | ||
"./%s/src" % package_name(), | ||
"--config-file", | ||
"./%s/.babelrc" % package_name(), | ||
"--out-dir", | ||
"$(@D)", | ||
"--extensions", | ||
".ts,.js", | ||
"--copy-files", | ||
"--quiet" | ||
], | ||
) | ||
|
||
js_library( | ||
name = PKG_BASE_NAME, | ||
srcs = NPM_MODULE_EXTRA_FILES, | ||
deps = [":target"] + DEPS, | ||
package_name = PKG_REQUIRE_NAME, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
pkg_npm( | ||
name = "npm_module", | ||
deps = [ | ||
":%s" % PKG_BASE_NAME, | ||
] | ||
) | ||
|
||
filegroup( | ||
name = "build", | ||
srcs = [ | ||
":npm_module", | ||
], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters