This repository has been archived by the owner on Jun 21, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #1. This includes a `test:debug` script to execute Karma. Karma's config uses the existing `tsconfig.spec.json` so test builds should be consistent between test and debug, though I suspect Karma adds its own options for sourcemapping. I had a lot of fun trying to get sourcemaps to work. The compiled JavaScript would be wrapped in coverage instrumentation, so the sourcemap comment was not at the end of the file, and thus would not be picked up by the browser. Eventually, I found the option to disable coverage which removed the instrumentation and Chrome was able to pick up the sourcemap. This does mean that coverage is very likely broken, but I'm not that concerned about it at the moment. I also discovered that Lerna's `--scope` command was not actually working. I would run `npm run lerna run foo --scope packages/bar/`, however `--scope` is actually an NPM argument, so NPM accepts it and does not pass it to Lerna. Since the repo is currently just one package, the lack of a scope would run on all packages, which is just that one so I had not noticed. Running `npm run -- foo-script` properly escapes arguments after the `--`. At this point I also discovered that the `--scope` flag expects a package name, not a path, so the *correct* way to run a command through Lerna is actually: ```shell npm run -- lerna run foo --scope bar ``` Updated the documentation to reflect this. If `foo` expects arguments, though should also follow a second `--`, for example: ```shell npm run -- lerna run foo --scope bar -- --baz hello/world.txt # Runs `npm run foo --baz hello/world.txt` in package `bar` ```
- Loading branch information