This guide covers setting up your development environment for contributing to the DJ (Data JSON) Framework VS Code extension.
- Prerequisites
- Extension Development Setup
- Development Scripts
- Debugging
- Making Changes
- Testing
- Getting Help
- Next Steps
For general environment setup (Trino, Java, dbt, etc.), see the Setup Guide.
For development, you'll also need:
- Node.js (v20.x - v22.x LTS recommended)
- npm (10.x or higher)
- VS Code (version 1.87.0 or higher)
- Clone and install dependencies:
git clone https://github.com/Workday/dj.git
cd dj
npm install-
Open the project in VS Code
-
Start development watchers (optional, for auto-rebuild):
npm run dev
-
Press
F5to launch Extension Development Host -
Open a dbt project in the new VS Code window
-
Make changes and press
Cmd+Shift+F5to reload
-
Build and package the extension:
npm run package # This will automatically run vscode:prepublish beforehand -
Install the generated VSIX file:
code --install-extension dj-*.vsix
| Command | Purpose |
|---|---|
npm run dev |
Start all watchers (TypeScript, web, tests) |
npm run watch:esbuild |
Watch and rebuild extension JS with esbuild |
npm run watch:test |
Watch and run tests |
npm run watch:tsc |
Watch TypeScript compilation (extension) |
npm run watch:web-build |
Watch and build web assets (Vite build) |
npm run watch:web-tsc |
Watch TypeScript compilation (web) |
- Extension logs: View → Output → "DJ"
- Reload extension:
Cmd+Shift+F5in Extension Development Host - Webview debugging: Developer → Open Webview Developer Tools
- Full reload: Developer → Reload Window
The root folder's package.json contains configuration read by Microsoft's Visual Studio Code Extension Manager (vsce). The README.md and CHANGELOG.md will be rendered within VSCode as part of the extension description.
-
Root
src/— Extension source (TypeScript)web/— Vite React app rendered in VS Code webviewsmacros/— SQL macros shipped and written into the active dbt project- You can change where macros are written using the VS Code setting
dj.dbtMacroPath. This is a subfolder relative to themacro-pathsdefined in your project'sdbt_project.yml. schemas/— JSON Schemas used for validation and TS type generationtests/— Test files and fixturesfixtures/— Test fixtures and reference dataupdate-fixtures.ts— Script to generate test fixtures from dbt projects
scripts/— Build and utility scriptsdist/— Built extension (dist/extension) and web assets (dist/web)
-
src/extension.ts— Extension activation/deactivation entryadmin.ts— VS Code platform helpers (e.g.,WORKSPACE_ROOT,runProcess, schema/sql paths,IS_LOCALhandling)services/api.ts— Routes API messages to servicescoder.ts— Core controller: wiring, commands, file watching, webview messagingdbt.ts— dbt project discovery, manifest parsing, tree views, hoversframework.ts— JSON↔SQL/YML sync logic, validation, webview-backed create flowslightdash.ts— Preview command integrationtrino.ts— Trino queries, tree view, query view wiring
shared/— Cross-environment utilities and types (api/,coder/,dbt/,framework/,git/,sql/,trino/,web/)shared/schema/types/— Generated fromschemas/vianpm run schema
-
web/- Vite app (React 18). Output is configured in
web/vite.config.tsto../dist/web(assets/main.js,assets/main.css) - Key dirs:
context/,elements/,forms/,pages/,styles/
- Vite app (React 18). Output is configured in
-
schemas/- Authoritative JSON Schemas for
.model.json/.source.json - Regenerate TS types with
npm run schema
- Authoritative JSON Schemas for
-
macros/- Macro files copied into the active dbt project on activation so dbt resolves them
Run the test suite:
npm testRun tests in watch mode:
npm run watch:testTo update test fixtures with new reference data:
npm run fixtures:update- Contributing Guidelines: See CONTRIBUTING.md for pull request process
- GitHub Issues: Report bugs or request features
- GitHub Discussions: Ask questions and get help from the community
- Documentation: Check docs/ for user guides and API documentation
Once your development environment is set up:
- Read the Contributing Guidelines for code standards and submission process
- Explore the codebase - start with
src/extension.tsfor the main entry point - Run the tests to ensure everything is working
- Make your changes and test thoroughly
- Submit a pull request following our guidelines
Ready to contribute? Check out CONTRIBUTING.md for the complete contribution workflow!