Prerequisites
Before you begin, ensure you have the following installed:- Node.js (version 18 or higher recommended)
- npm (comes with Node.js)
- Visual Studio Code (version 1.109.0 or higher)
- Git for version control
Getting Started
Follow these steps to set up your local development environment:Clone the repository
Clone the View Exports SVG repository to your local machine:Navigate to the project directory:
Install all dependencies
The extension has dependencies in both the root and the client directory. Use the following command to install all dependencies at once:This command will:
- Install root-level dependencies for the extension
- Navigate to the
client/directory and install webview UI dependencies
The
install:all script runs npm install in the root directory, then cd client && npm install for the webview UI.Build the webview UI
Before you can run the extension, you need to build the webview UI:This compiles the React-based webview interface using Vite.
Compile the extension
Compile the TypeScript extension code:This generates the JavaScript output in the
out/ directory.Development Workflow
Once your environment is set up, you can use the following commands during development:Watch Mode
For active development, you can run the extension in watch mode:Client Development
To work on the webview UI with hot reload:Code Quality
Format and check your code using Biome:Environment Setup
Troubleshooting
Dependencies Not Installing
If you encounter issues withnpm run install:all, try:
- Delete
node_modules/andpackage-lock.jsonin both root and client directories - Run
npm installmanually in the root directory - Run
npm installmanually in theclient/directory
Extension Not Loading
If the extension doesn’t load when pressingF5:
- Ensure you’ve run
npm run client:build - Ensure you’ve run
npm run compile - Check the Debug Console in VS Code for error messages
- Try cleaning the output directory:
npm run compile:clean
Next Steps
Now that your development environment is set up, you can:- Learn about the project architecture
- Explore the build process
- Run the test suite