| load("//:defs.bzl", "nodejs_binary") |
| |
| # You can have a nodejs_binary with no node_modules attribute |
| # and no fine grained deps |
| nodejs_binary( |
| name = "no_deps", |
| data = ["no-deps.js"], |
| entry_point = "build_bazel_rules_nodejs/internal/node/test/no-deps", |
| ) |
| |
| # You can have a nodejs_binary with a node_modules attribute |
| # and no fine grained deps |
| nodejs_binary( |
| name = "has_deps_legacy", |
| data = ["has-deps.js"], |
| entry_point = "build_bazel_rules_nodejs/internal/node/test/has-deps", |
| node_modules = "@fine_grained_deps_yarn//:node_modules", |
| ) |
| |
| # You can have a nodejs_binary with no node_modules attribute |
| # and fine grained deps |
| nodejs_binary( |
| name = "has_deps", |
| data = [ |
| "has-deps.js", |
| "@fine_grained_deps_yarn//typescript", |
| ], |
| entry_point = "build_bazel_rules_nodejs/internal/node/test/has-deps", |
| ) |
| |
| # You can have a nodejs_binary with both a node_modules attribute |
| # and fine grained deps so long as they come from the same root |
| nodejs_binary( |
| name = "has_deps_hybrid", |
| data = [ |
| "has-deps.js", |
| "@fine_grained_deps_yarn//typescript", |
| ], |
| entry_point = "build_bazel_rules_nodejs/internal/node/test/has-deps", |
| node_modules = "@fine_grained_deps_yarn//:node_modules", |
| ) |