-
-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
blockedBlocked by another issueBlocked by another issueenhancementNew feature or requestNew feature or request
Description
What is the current behavior?
For library targets, users must use npm_link_all_packages to link libraries before using :node_modules. For binary targets, users need to import the bin object for a library and manually declare it.
Describe the feature
Instead of:
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@npm//:typescript/package_json.bzl", "bin") # This is just an example
load("@aspect_rules_js//js:defs.bzl", "js_run_binary")
npm_link_all_packages()
js_library(
name = "test",
deps = [
":node_modules/lodash"
]
)
bin.typescript_binary(
name = "typescript",
)
js_run_binary(
name = "t2",
tool = ":typescript",
)let's do
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@npm//:typescript/package_json.bzl", "bin") # This is just an example
js_library(
name = "test",
deps = [
"@npm//:node_modules/lodash" # Or preferably "@npm//node_modules/lodash"
]
)
js_run_binary(
name = "t2",
tool = "@npm//node_modules/typscript/bin:typescript",
)Metadata
Metadata
Assignees
Labels
blockedBlocked by another issueBlocked by another issueenhancementNew feature or requestNew feature or request