-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbundle.js
More file actions
26 lines (23 loc) · 696 Bytes
/
bundle.js
File metadata and controls
26 lines (23 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const vsce = require('vsce');
const path = require('path');
const fs = require('fs');
async function packageExtension() {
try {
const bundlePath = path.resolve(__dirname, 'bundle');
if (!fs.existsSync(bundlePath)) {
fs.mkdirSync(bundlePath);
}
const packageOptions = {
cwd: __dirname,
packagePath: './bundle/hex2int.vsix',
icon: {
"base": path.resolve(__dirname, 'res', 'icon.png'), // Specify the correct relative path to the icon
}
};
await vsce.createVSIX(packageOptions);
console.log('Extension bundled successfully!');
} catch (error) {
console.error('Error bundling extension:', error);
}
}
packageExtension();