Read the OpenFGA Contribution Process and the OpenFGA Code of Conduct.
- Run
npm install
in the root directory. This installs all necessary npm modules. - Run
npm run compile
in the root directory build both server and client code.
To generate an installable build of this extension, you can do the following:
- Run
npm install --global @vscode/vsce
to get the latest version ofvsce
for packaging - Run
vsce package
to generate an installableVISX
artifact for testing or distribution
.
├── client // Language Client
│ ├── src
│ │ ├── test // End to End tests for Language Client / Server
│ │ ├── extension.node.ts // Language Client node entry point
│ │ └── extension.browser.ts // Language CLient web entry point
│ └── testFixture // Directory containing test files used in e2e tests
├── package.json // The extension manifest.
└── server // Language Server
└── src
├── server.node.ts // Language Server node entry point
├── server.browser.ts // Language Server web entry point
└── server.common.ts // Language Server common code
- Run
npm install
in the root directory. This installs all necessary npm modules. - Open the root directory in VS Code.
- Press Ctrl+Shift+B (Windows) or Command+Shift+B (OSX) to start compiling the client and server in watch mode.
- Switch to the Run and Debug View in the Sidebar (Ctrl+Shift+D on Windows, Command+Shift+D on OSX).
- Select
Launch Client
from the drop down (if it is not already). - Press ▷ to run the launch config (F5).
- Select
Attach to Server
from the drop down, and press ▷ to enable debugging on server code
- Run
npm run compile
to compile the server and client for testing. - Run
npm run test-node
to execute the client node test suite. - Run
npm run test-web
to execute the client browser test suite. - Run
npm run test-web-headless
to execute the client browser test suite in headless mode.
- To manually test the extension in the browser for VS Code for the Web before publishing, follow these instructions to setup a VS Code for the Web instance with your local extension, and then proceed with the normal testing flow.