Skip to content

Commit

Permalink
chore(NA): creates wrapper macro for pkg_npm rule (#117715) (#117734)
Browse files Browse the repository at this point in the history
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
  • Loading branch information
kibanamachine and mistic authored Nov 5, 2021
1 parent 3208ffd commit 416182a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dev/bazel/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Please do not import from any other files when looking to use a custom rule

load("//src/dev/bazel:jsts_transpiler.bzl", _jsts_transpiler = "jsts_transpiler")
load("//src/dev/bazel:ts_project.bzl", _ts_project = "ts_project")
load("//src/dev/bazel:pkg_npm.bzl", _pkg_npm = "pkg_npm")

jsts_transpiler = _jsts_transpiler
pkg_npm = _pkg_npm
ts_project = _ts_project
16 changes: 16 additions & 0 deletions src/dev/bazel/pkg_npm.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"Simple wrapper over the general pkg_npm rule from rules_nodejs so we can override some configs"

load("@build_bazel_rules_nodejs//internal/pkg_npm:pkg_npm.bzl", _pkg_npm = "pkg_npm_macro")

def pkg_npm(validate = False, **kwargs):
"""A macro around the upstream pkg_npm rule.
Args:
validate: boolean; Whether to check that the attributes match the package.json. Defaults to false
**kwargs: the rest
"""

_pkg_npm(
validate = validate,
**kwargs
)

0 comments on commit 416182a

Please sign in to comment.