Gitainer VS Code Extension
Preview Gitainer stack hydration and environment variables directly in VS Code.
Features
- Hydration Preview: See how your
docker-compose.yaml looks after resolving all #! fragment imports.
- Env Variables Preview: View a table of all environment variables used in your compose file and their resolved values from
.env.
- IntelliSense Hover: Hover over
#! fragment import lines to see the content of the fragment without opening the file.
Installation
From Source
- Clone the repository.
- Navigate to
packages/gitainer-extension.
- Install dependencies:
bun install
- Build the extension:
bun run compile
- Press
F5 in VS Code to open a new window with the extension loaded, or package it (see below).
Using VSIX Package
- Generate the
.vsix package:
bun run package
- In VS Code, go to the Extensions view (
Ctrl+Shift+X).
- Click the
... (Views and More Actions) menu and select Install from VSIX....
- Select the generated
gitainer-extension-0.0.1.vsix file.
Advanced Features
- Variable Hovers: Hover over
$VAR to see resolved values.
- Anchor Hovers/Completion: Hover over
*anchor to see its source fragment, and get completions for anchors defined in fragments.
- Anchor Autofill: Automatically insert required anchor templates when importing fragments.
Publishing
To publish the extension to the VS Code Marketplace:
- Create a publisher at Manage Publishers.
- Create a Personal Access Token (PAT) in Azure DevOps with
Marketplace -> Publish scope.
- Use the helper script:
./publish.sh <YOUR_PAT>
Or run the bun script:
bun run publish -- -p <YOUR_PAT>
Development
bun run compile: Build the extension.
bun run watch: Build and watch for changes.
bun run package: Create a .vsix file.
| |