Development
April 11, 2026 · View on GitHub
How to build, run, and test DocuMate locally. See also architecture.md.
Prerequisites
- Node.js (LTS recommended; align with
enginesif you add one inpackage.json) - npm
- VS Code or Cursor with the Extension Development Host workflow
Clone and install
git clone https://github.com/inandi/documate.git
cd documate
npm install
Run the extension
- Open this folder in the editor:
code .(VS Code) orcursor .(Cursor). - Run Run Extension from the Run and Debug view (or F5).
Configuration:.vscode/launch.json. - In the Extension Development Host window, open
sample/index.phporsample/main.js. - Use the editor context menu → DocuMate: Code Documentation to exercise commands.
Lint and test
| Script | Description |
|---|---|
npm run lint | ESLint (eslint.config.mjs) over **/*.js |
npm test | Runs pretest (lint), then @vscode/test-cli — see .vscode-test.mjs |
Note: After
npm test, a.vscode-test/tree may appear; it is gitignored.eslint.config.mjsignores.vscode-testandnode_modulessonpm run lintonly targets project sources.
Troubleshooting
| Issue | What to try |
|---|---|
| Commands missing | Confirm language is PHP or JavaScript (editorLangId in package.json menus). |
| Wrong author/version in snippets | Reload Window after changing User or Workspace settings; config.js is read at module load. |
| Extension does not activate | Check Output → Log (Extension Host) for load errors. |
Related
- overview.md — documentation index
- contributing.md — pull requests and style