-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: mode developer docs to a different page
- Loading branch information
Showing
3 changed files
with
129 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ node_modules | |
client/server | ||
.vscode-test | ||
.vscode-test-web | ||
.DS_Store | ||
.DS_Store | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Development and Contributing to the OpenFGA VS Code Extension | ||
|
||
Read the [OpenFGA Contribution Process](https://github.com/openfga/.github/blob/main/CONTRIBUTING.md) and the [OpenFGA Code of Conduct](https://github.com/openfga/.github/blob/main/CODE_OF_CONDUCT.md). | ||
|
||
## Getting Started | ||
|
||
- Run `npm install` in the root directory. This installs all necessary npm modules. | ||
- Run `npm run compile && npm run test-node` to execute the client node test suite. | ||
|
||
## Distribution (Optional) | ||
|
||
To generate an installable build of this extension, you can do the following: | ||
|
||
- Run `npm install --global @vscode/vsce` to get the latest version of `vsce` for packaging | ||
- Run `vsce package` to generate an installable `VISX` artifact for testing or distribution | ||
|
||
## Structure | ||
|
||
``` | ||
. | ||
├── 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 | ||
├── 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 | ||
``` | ||
|
||
## Running the Client | ||
|
||
- 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](https://code.visualstudio.com/docs/editor/tasks#:~:text=The%20first%20entry%20executes,the%20HelloWorld.js%20file.). | ||
- 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). | ||
|
||
## Testing | ||
|
||
- Run `npm install` in the root directory. This installs all necessary npm modules. | ||
- Run `npm run compile` to compile the code & client for testing. | ||
- Run `npm run test-node` to execute the client node test suite. | ||
|
||
### Remote Testing the Web functionality | ||
|
||
- To manually test the extension in the browser for [VS Code for the Web](https://vscode.dev/) before publishing, follow [these instructions](https://code.visualstudio.com/api/extension-guides/web-extensions#test-your-web-extension-in-vscode.dev) to setup a VS Code for the Web instance with your local extension, and then proceed with the normal testing flow. |