summaryrefslogtreecommitdiff
path: root/extension/scripts/package.js
blob: 26a49fda3f98d4f3f4c1f6f64c92c81d554155e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const { exec } = require("child_process");
const fs = require("fs");

const args = process.argv.slice(2);
const isPreRelease = args.includes("--pre-release");

if (!fs.existsSync("build")) {
  fs.mkdirSync("build");
}

const command = isPreRelease
  ? "vsce package --out ./build patch --pre-release --baseContentUrl https://localhost/"
  : "vsce package --out ./build patch --baseContentUrl https://localhost/";

exec(command, (error) => {
  if (error) throw error;
  console.log("vsce package completed");
});