Skip to content

Commit

Permalink
Merge branch 'master' into TestUserSampleDataMap
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Apr 14, 2021
2 parents d2d98b9 + 0bfa5aa commit e7890e9
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 1,571 deletions.
1 change: 1 addition & 0 deletions docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ yarn kbn watch-bazel
- @elastic/datemath
- @kbn/apm-utils
- @kbn/config-schema
- @kbn/tinymath

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"@kbn/server-http-tools": "link:packages/kbn-server-http-tools",
"@kbn/server-route-repository": "link:packages/kbn-server-route-repository",
"@kbn/std": "link:packages/kbn-std",
"@kbn/tinymath": "link:packages/kbn-tinymath",
"@kbn/tinymath": "link:bazel-bin/packages/kbn-tinymath/npm_module",
"@kbn/ui-framework": "link:packages/kbn-ui-framework",
"@kbn/ui-shared-deps": "link:packages/kbn-ui-shared-deps",
"@kbn/utility-types": "link:packages/kbn-utility-types",
Expand Down
3 changes: 2 additions & 1 deletion packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ filegroup(
srcs = [
"//packages/elastic-datemath:build",
"//packages/kbn-apm-utils:build",
"//packages/kbn-config-schema:build"
"//packages/kbn-config-schema:build",
"//packages/kbn-tinymath:build",
],
)
71 changes: 71 additions & 0 deletions packages/kbn-tinymath/BUILD.bazel
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"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ String
/ [\'] value:(ValidChar)+ [\'] { return value.join(''); }
/ value:(ValidChar)+ { return value.join(''); }


Argument
= name:[a-zA-Z_]+ _ '=' _ value:(Number / String) _ {
return {
Expand Down
File renamed without changes.
7 changes: 1 addition & 6 deletions packages/kbn-tinymath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true,
"main": "src/index.js",
"types": "tinymath.d.ts",
"scripts": {
"kbn:bootstrap": "yarn build",
"build": "../../node_modules/.bin/pegjs -o src/grammar.js src/grammar.pegjs"
},
"dependencies": {}
"types": "index.d.ts"
}
Loading

0 comments on commit e7890e9

Please sign in to comment.