Add script to print VSIX path after packaging the extension
This commit is contained in:
@@ -9,7 +9,8 @@
|
|||||||
"build": "yarn build-data-extraction && yarn build-ui && yarn build-extension",
|
"build": "yarn build-data-extraction && yarn build-ui && yarn build-extension",
|
||||||
"build-data-extraction": "yarn workspace @hediet/debug-visualizer-data-extraction build",
|
"build-data-extraction": "yarn workspace @hediet/debug-visualizer-data-extraction build",
|
||||||
"build-ui": "yarn workspace debug-visualizer-webview build",
|
"build-ui": "yarn workspace debug-visualizer-webview build",
|
||||||
"build-extension": "yarn workspace debug-visualizer build"
|
"build-extension": "yarn workspace debug-visualizer build",
|
||||||
|
"package": "yarn build && yarn workspace debug-visualizer package && node print-vsix-path.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier": "^2.8.8"
|
"prettier": "^2.8.8"
|
||||||
|
|||||||
13
print-vsix-path.js
Normal file
13
print-vsix-path.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// Run after `yarn workspace debug-visualizer package` -- vsce's own stdout
|
||||||
|
// ("DONE Packaged: ...") isn't meant to be parsed programmatically, so this
|
||||||
|
// just checks the fixed -o path that extension/package.json's own "package"
|
||||||
|
// script passes to vsce, and prints it (or fails loudly if it's missing).
|
||||||
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
|
const vsixPath = path.resolve(__dirname, "extension", "dist", "extension.vsix");
|
||||||
|
if (!fs.existsSync(vsixPath)) {
|
||||||
|
console.error("Expected .vsix not found at " + vsixPath);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
console.log(vsixPath);
|
||||||
Reference in New Issue
Block a user