* added try catch on newly added code to buildjs that copies node_sqlite3 to a build directory that may not exist * fix typo extensioins -> extensions * added new npm command to build for all platforms * started adding code to download the ripgrep binaries, will have to finish at a later date * - added platforms global variable - added check for --all parameter - moved alpine check to utils - moved all packaging code to package() - added links to esbuild binaries - chaged code in IIFE to either package for all or package for target * moved alpine config to utils * added the code that will download the ripgrep binaries * added npm run script package-all which will run the package-all.js script * added package-all script which will package all major builds * - commented out old downloadEsbuildBinary and rewrote it - finished the downloadRipgrepBinary() and exported it * - added back some of the old code to make this script reusable - commented out the esbuild download and install in favor of downloading the prebuilt binary - download the ripgrep binary - containerized the all of the package code into package() and call it in the IIFE * added a check for the --target flag and append it to the vsce command * removed unused variable
28 lines
690 B
JavaScript
28 lines
690 B
JavaScript
const { exec } = require("child_process");
|
|
const fs = require("fs");
|
|
|
|
const args = process.argv.slice(2);
|
|
let target;
|
|
|
|
if (args[0] === "--target") {
|
|
target = args[1];
|
|
}
|
|
|
|
if (!fs.existsSync("build")) {
|
|
fs.mkdirSync("build");
|
|
}
|
|
|
|
const isPreRelease = args.includes("--pre-release");
|
|
|
|
let command = isPreRelease
|
|
? "npx vsce package --out ./build patch --pre-release --no-dependencies" // --yarn"
|
|
: "npx vsce package --out ./build patch --no-dependencies"; // --yarn";
|
|
|
|
if (target) command += ` --target ${target}`;
|
|
|
|
exec(command, (error) => {
|
|
if (error) throw error;
|
|
console.log(
|
|
"vsce package completed - extension created at extensions/vscode/build/continue-patch.vsix",
|
|
);
|
|
});
|