File Structure
This page describes the file structure of a Vicinae extension.
A valid Vicinae extension is a directory containing at least two things:
- a manifest file named
package.json, which is a regularpackage.jsonfile with Vicinae-specific additions. - one or more command entrypoints under the
srcsubdirectory, such assrc/command_name.tsx. Each must map to a valid command name in the manifest.
This is what a typical extension directory looks like:
my-first-extension
├── assets
│ └── extension_icon.webp
├── package.json
├── package-lock.json
├── README.md
├── src
│ └── my-first-command.tsx
└── tsconfig.json
We may add configuration files for JavaScript tooling in the future (eslint, prettier, etc.).
Source directory
The source directory should contain all your source files (not only command entrypoints).
For each command defined in the extension manifest, you need to have a corresponding entrypoint directly under src.
For a command named my-command, you need a corresponding src/my-command.tsx or src/my-command.ts entrypoint.
You should use the .ts extension for no-view commands and the .tsx extension for view commands.
Using .tsx for no-view commands is still supported but not the other way around.
Assets directory
The assets directory contains icons and other files that are packaged into the extension bundle. All assets can be referenced at runtime and used as images where Vicinae expects them. This is also where extension or command icons referenced in the manifest should be placed.
Other files
node_modules: dependencies required for the extension to run. Do not modify this directory manually.package-lock.json: locked versions of the dependencies. Do not edit directly.