Skip to content

Development

Bobby Galli edited this page Jun 15, 2021 · 2 revisions

For the best development experience, you'll want to use npm link in order to develop bugsplat-js-api-client and consuming packages (WebAppApiTests, bugsplat-web-app, etc) simultaneously. By using npm link in conjuncture with TypeScript's watch feature you can make a change in @bugsplat/js-api-client and have it automatically update in the consuming project.

The following steps will make a local version of @bugsplat/js-api-client available to a consuming package:

  1. git clone https://github.com/BugSplat-Git/bugsplat-js-api-client
  2. cd bugsplat-js-api-client && npm i
  3. npm run build
  4. npm link

The following command will configure the consuming package to use the local version of @bugsplat/js-api-client:

  1. npm link @bugsplat/js-api-client

Depending on if the consuming package is running in Node.js or a web browser you can configure @bugsplat/js-api-client to automatically re-compile when a change is detected:

  1. cd ../bugsplat-js-api-client
  2. npm run watch:cjs for Node.js or npm run watch:esm for web browsers
Clone this wiki locally