Welcome and thank you for your interest in contributing to ts-utils
If making a large change we request that you open an [issue][GitHubIssue] first.
-
Clone the repository and create a new branch
git clone https://github.com/nevware21/ts-utils.git
-
Install all dependencies
npm install
-
Build
Rebuilding also runs all of the tests in node, browser, a web worker and generates the typedoc docs.
npm run rebuild
-
Run Tests
Run all tests in node, browser and a web worker.
npm run test
-
Generate typedoc
npm run docs
-
Debugging failing tests in a browser
This runs karma in "watch" mode to avoid the browser automatically closing, to debug process the Debug button in the corner.
As this uses watch mode you can also just leave this running as you make code changes, however, if there is a compile error this can cause the browser to be closed.
Terminating the debug session can require several CTRL-C's in the terminal window used to start the debug session.
npm run test:debug
By default this is configured to run using chromiumn based Edge, you can change the
process.env.CHROME_BIN = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
at the top of thekarma.debug.conf.js
file to use a different chromium based browser.
This will build and run all of the tests in node and in headless chromium.
```
npm run rebuild
```
If you are changing package versions or adding/removing any package dependencies, run> npm install before building. Please check-in any files that change under docs\ folder.