From ba22281dd7113366cb59bc469d2b2c86e665d9b7 Mon Sep 17 00:00:00 2001 From: Kevin Reilly Date: Thu, 16 Mar 2023 16:58:30 -0700 Subject: [PATCH] docs: alternative for local `karma-cli` install --- docs/intro/01-installation.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/intro/01-installation.md b/docs/intro/01-installation.md index 429ac1561..7d5cddee3 100644 --- a/docs/intro/01-installation.md +++ b/docs/intro/01-installation.md @@ -40,6 +40,12 @@ $ npm install -g karma-cli Then, you can run Karma simply by `karma` from anywhere and it will always run the local version. +Alternatively, you can install `karma-cli` for the current project only and use scripts. First add `"karma": "karma"` to your package.json. +```bash +$ npm install karma-cli --save-dev +$ npm run karma start +``` + [Node.js]: https://nodejs.org/ [npm]: https://www.npmjs.com/package/karma