Use Node.js 22.12 or newer and install the locked dependencies:
npm ci
npm run build:editor
The VS Code API types stay pinned to the minimum supported version in engines.vscode.
Standard uses its own compatible ESLint dependency.
Open this project in VSCode.
Then in VSCode click Run > Start Debugging.
That will open up a second VSCode that you can refresh when making changes. see more
CMD + R to refresh the extension, after making changes.
npm test
Tests download the current stable VS Code and use a temporary workspace containing
HELLO=World in its .env file. No credentials or local .env file are needed.
The Monaco integration test runs the production editor inside a real VS Code webview. It checks computed visibility on animation frames during initial loading, editing, and tab switches, with an explicit reveal as a positive control. The test host disables background throttling so frame checks run even when it is unfocused. This checks browser render state; it is not a substitute for recording the screen when validating compositor behavior on a particular platform.
npm run build:editor bundles the local Monaco editor and worker into
media/editor/dist. Rebuild after frontend changes. Packaging builds these assets
automatically; renderer test assets are excluded from the VSIX.
Package it locally.
npm run package
Install it locally.
npm run install-package dotenv-vscode-x.x.x.vsix
or install it by hand through Visual Studio Code.
Click Extensions > ... > Install from VSIX > Select dotenv-vscode-*-*-*.vsix
[1] https://community.particle.io/t/how-to-install-a-vscode-extension-from-a-vsix-file/51014 [2] https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix
Publishing to the Visual Studio Marketplace and Open VSX runs automatically when
a vX.Y.Z tag is pushed, after audit, lint, tests, and packaging pass. The tag
must match the version in package.json. Each registry has an independent job,
so a failure at one does not cancel publishing to the other.
One-time setup: add a repository Actions secret named VSCE_PAT in GitHub under
Settings > Secrets and variables > Actions. Use a valid Marketplace token with
the Manage scope and access to the dotenv publisher.
For Open VSX, complete the publisher setup:
- Sign in to Open VSX with GitHub, link your Eclipse account, and review and accept the Publisher Agreement.
- Generate an Open VSX access token
and save it as the repository Actions secret
OVSX_PAT. - Ensure the token's account can publish to the
dotenvnamespace (thepublisherinpackage.json). If it does not exist, setOVSX_PATin your local environment and runnpx --no-install ovsx create-namespace dotenv. If it already exists, obtain membership instead. Marketplace publisher access does not grant Open VSX access. - Claim namespace ownership to have the extension marked as verified.
From a clean, up-to-date master branch, create and push the next release:
npm version patch
git push origin master --follow-tagsnpm version patch updates the package files and creates the version commit and
annotated tag. Use a new version for each release; already published versions
cannot be published again. No publishing tokens are needed on your machine for
the tag workflow. If only one registry fails, fix its credentials or access and
use GitHub Actions Re-run failed jobs to retry only that registry.
To publish manually instead:
npm run login -- dotenv
npm run publish
To publish a packaged version to Open VSX manually, set OVSX_PAT in your local
environment, then run:
npm run package
npx --no-install ovsx publish dotenv-vscode-X.Y.Z.vsix --registryUrl https://open-vsx.orgReplace X.Y.Z with the version in package.json. This also lets you publish an
existing Marketplace release to Open VSX without trying to republish it to the
Marketplace. The Open VSX token is separate from VSCE_PAT; keep both out of the
repository.
[1] https://code.visualstudio.com/api/working-with-extensions/publishing-extension#publishing-extensions [2] https://marketplace.visualstudio.com/manage/publishers/dotenv
List of all icons https://code.visualstudio.com/api/references/icons-in-labels List of all icons https://microsoft.github.io/vscode-codicons/dist/codicon.html
Find list of keywords here: https://stackoverflow.com/questions/10834765/where-to-find-a-list-of-scopes-for-sublime2-or-textmate
https://stackoverflow.com/questions/47117621/how-to-get-the-vscode-theme-color-in-vscode-extensions