vsix-utils
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

vsix-utils

npm version npm downloads jsr version

utilities for working with vsix files

[!NOTE] If you are looking for a way to create vsix files programmatically, you can use the vsix-builder package, or if you just want to build with a CLI, you can use vsix-pack. This is just the building blocks, that powers vsix-builder and vsix-pack.

📦 Installation

npm install vsix-utils

🚀 Usage

import { readVsix, writeVsix } from "vsix-utils";

const success = await writeVsix({
  packagePath: "path/to/vsix",
  force: true, // will overwrite the file if it exists
  epoch: 1000000, // by using epoch it will always generate the same vsix file, if the files hasn't changed.
  files: [
    {
      type: "local",
      localPath: "path/to/file.txt",
      path: "file.txt"
    },
    {
      type: "in-memory",
      contents: "file contents", // or use a buffer
      path: "file.txt"
    }
  ],
});

if (success) {
  const vsix = await readVsix({
    packagePath: "path/to/vsix"
  });
  console.log(vsix);
}

📄 License

Published under MIT License.

Package Sidebar

Install

npm i vsix-utils

Weekly Downloads

19

Version

0.0.10

License

MIT

Unpacked Size

192 kB

Total Files

34

Last publish

Collaborators

  • luxass