florentulve / vstortoise

A simple TortoiseSVN binding fro Visual Code
MIT License
2 stars 2 forks source link

how to build .vsix? #8

Open zhaoqingqing opened 2 years ago

zhaoqingqing commented 2 years ago

how to build .vsix file? i want to custom some menu.

my vscode version :1.65.2 x64 ,my os : windows 10 x64 i use command in cmd:

npm install
npm install vscode
vsce package

get error:

 D:\Code\vstortoise> npm install vscode
npm WARN deprecated vscode@1.1.37: This package is deprecated in favor of @types/vscode and vscode-test. For more information please read: https://code.visualstudio.com/updates/v1_36#_splitting-vscode-package-into-typesvscode-and-vscodetest
npm WARN deprecated vscode-test@0.4.3: This package has been renamed to @vscode/test-electron, please update to the new name

added 18 packages, removed 132 packages, and audited 78 packages in 3s

3 packages are looking for funding
  run `npm fund` for details

4 vulnerabilities (3 moderate, 1 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

use pack command , get error:

PS D:\Code\vstortoise> vsce package
Executing prepublish script 'npm run vscode:prepublish'...

> vstortoise@1.9.2 vscode:prepublish
> npm run compile

> vstortoise@1.9.2 compile
> tsc -p ./

src/extension.ts:40:9 - error TS2532: Object is possibly 'undefined'.

40         window.activeTextEditor.document.save().then(()=>{
           ~~~~~~~~~~~~~~~~~~~~~~~

src/Utils.ts:5:59 - error TS2532: Object is possibly 'undefined'.

5     return (context && context.fsPath) ? context.fsPath : window.activeTextEditor.document.fileName;
                                                            ~~~~~~~~~~~~~~~~~~~~~~~

 ERROR  npm failed with exit code 2
PS D:\Code\vstortoise>