簡體   English   中英

如果我必須 git 克隆整個項目並使用“vsce 包”生成它,如何生成與 vscode 擴展中的相同的 VSIX 文件?

[英]How can I generate the same VSIX file as the one in vscode extensions if I had to git clone the whole project and use “vsce package” to generate it?

要為我的問題提供更多詳細信息:

實際上,我在筆記本電腦上安裝了我的 vscode,僅用於工作,並且由於訪問限制,我無法在 vscode 中安裝任何擴展,也無法通過 Microsoft 市場手動下載。 So I GitHub clone( https://github.com/microsoft/vscode-python.git ) the Microsoft python vscode extension project and tried to use node.js to generate("vsce package") the VSIX by myself, so that I can manually安裝此 VSIX。 而且我確實管理生成了 VSIX 文件,但它只有 400K 的大小,遠遠小於原始大小為 40M 的文件。

所以我想知道我在哪里做錯了,或者有沒有人好心讓我知道我應該怎么做才能生成一個完整的 VSIX 作為下載的?

謝謝!

根據 vscode python 擴展的文檔,您必須運行一些額外的構建步驟來創建 vsix 的本地構建:

https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md#development-process

> npm install -g vsce
# Perform the next steps in the vscode-python folder.
> npm ci
> python3 -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
> python3 -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
# For python 3.6 and lower use this command to install the debugger
> python3 -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
# For python 3.7 and greater use this command to install the debugger
> python3 -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
> python3 ./pythonFiles/install_debugpy.py
> npm run clean
> npm run package # This step takes around 10 minutes.

這不一定是與發布版本相同的版本, 此處有額外的要求。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM