A programmatic way to create VSIX files for Visual Studio Code extensions.
Important
This package is still in development and may not work as expected. Please report any issues you encounter.
npm install vsix-builder
import { createVsix } from "vsix-builder";
const vsix = await createVsix({
write: true,
forceWrite: true,
cwd: "./",
packageManager: "pnpm",
});
if (vsix.errors.length > 0) {
console.error("some errors occurred while creating the vsix package");
for (const error of vsix.errors) {
console.error(` - ${error.type}${"message" in error ? `: ${error.message}` : ""}`);
}
return;
}
if (!vsix.written) {
console.warn("no vsix package was created, as you are in dry-run mode");
return;
}
Published under MIT License.