-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(NA): moving @kbn/tinymath into bazel (#97022)
* chore(NA): moving @kbn/tinymath into bazel * chore(NA): fixed jest tests * chore(NA): simplified tsconfig file Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
6f57c85
commit 8f2e987
Showing
12 changed files
with
82 additions
and
1,571 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,4 +64,5 @@ yarn kbn watch-bazel | |
- @elastic/datemath | ||
- @kbn/apm-utils | ||
- @kbn/config-schema | ||
- @kbn/tinymath | ||
|
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,71 @@ | ||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") | ||
load("@npm//pegjs:index.bzl", "pegjs") | ||
|
||
PKG_BASE_NAME = "kbn-tinymath" | ||
PKG_REQUIRE_NAME = "@kbn/tinymath" | ||
|
||
SOURCE_FILES = glob( | ||
[ | ||
"src/**/*", | ||
] | ||
) | ||
|
||
TYPE_FILES = [ | ||
"index.d.ts", | ||
] | ||
|
||
SRCS = SOURCE_FILES + TYPE_FILES | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = SRCS, | ||
) | ||
|
||
NPM_MODULE_EXTRA_FILES = [ | ||
"package.json", | ||
"README.md", | ||
] | ||
|
||
DEPS = [ | ||
"@npm//lodash", | ||
] | ||
|
||
pegjs( | ||
name = "grammar", | ||
data = [ | ||
":grammar/grammar.pegjs" | ||
], | ||
output_dir = True, | ||
args = [ | ||
"-o", | ||
"$(@D)/index.js", | ||
"./%s/grammar/grammar.pegjs" % package_name() | ||
], | ||
) | ||
|
||
js_library( | ||
name = PKG_BASE_NAME, | ||
srcs = [ | ||
":srcs", | ||
":grammar" | ||
], | ||
deps = DEPS, | ||
package_name = PKG_REQUIRE_NAME, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
pkg_npm( | ||
name = "npm_module", | ||
srcs = NPM_MODULE_EXTRA_FILES, | ||
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
File renamed without changes.
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
Oops, something went wrong.