historical/xcloud-keyboard-mouse-inftrial.git/CONTRIBUTING.md
2024-01-16 11:20:27 -06:00

1.5 KiB

Contributing

If you make any contributions to this repository after this file was created, you are agreeing that any code you have contributed will be licensed under the terms outlined in README.md.

Prerequisites

Setup

npm install

Build

In order to test or distribute the extension, you must first build the TypeScript into a JavaScript bundle using one of the following commands (based on the target browser):

Chrome:

npm run build:chrome

Edge:

npm run build:edge

Firefox:

npm run build:firefox

Safari:

See here for more complete Safari instructions.

In addition to rebuilding the JavaScript extension with this command, you will also need to re-build the Xcode Swift project as well for Safari each time you make a change.

npm run build:safari

Build in watch mode

You can also run the following command to automatically re-build the extension each time you change any of the source files using the watch script instead of build:

npm run watch:<chrome|edge|firefox|safari>

Visual Studio Code

Run watch mode in VS Code:

type Ctrl + Shift + B

Load extension to Chrome/Edge

  1. Go to about:extensions or open Window -> Extensions
  2. Enable "developer mode"
  3. Click "Load unpacked" and select the dist directory

Test

npx jest or npm run test