mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-25 16:57:51 +08:00
build: ensure source maps are used for jasmine stack traces
`rules_js` doesn't integrate source maps by default, so we are enabling it by default via `defaults2.bzl`.
This commit is contained in:
parent
74162d54b2
commit
037bbe5ca5
@ -8,10 +8,18 @@ def ts_project(**kwargs):
|
|||||||
def npm_package(**kwargs):
|
def npm_package(**kwargs):
|
||||||
_npm_package(**kwargs)
|
_npm_package(**kwargs)
|
||||||
|
|
||||||
def jasmine_test(**kwargs):
|
def jasmine_test(data = [], **kwargs):
|
||||||
|
# Create relative path to root, from current package dir. Necessary as
|
||||||
|
# we change the `chdir` below to the package directory.
|
||||||
|
relative_to_root = "/".join([".."] * len(native.package_name().split("/")))
|
||||||
|
|
||||||
_jasmine_test(
|
_jasmine_test(
|
||||||
node_modules = "//:node_modules",
|
node_modules = "//:node_modules",
|
||||||
chdir = native.package_name(),
|
chdir = native.package_name(),
|
||||||
args = ["**/*.js"],
|
args = [
|
||||||
|
"--require=%s/node_modules/source-map-support/register.js" % relative_to_root,
|
||||||
|
"**/*.js",
|
||||||
|
],
|
||||||
|
data = data + ["//:node_modules/source-map-support"],
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user