我从来没有在vscode分机和nodejs/npm分机工作过

我正在try 编译这个扩展:

我已经下载了nodejs,安装了,然后我下载了扩展源,open cmd:

cd 'folder where is the extension src' > npm install package.json

它安装并创建了一个文件夹node_modules

我做得对吗?接下来的步骤是什么?

推荐答案

  1. The easiest way will be from the extension directory in your VSCode, you can open that using one of these three ways:
    a. View > Extension
    b. From sidebar, click on extension icon
    c. CTRL + Shift + x

然后搜索带有引号的"排水沟预览",你会得到一个名为"图像预览"的结果,即扩展,只需单击"安装".

  1. Another way is visit this url
    https://marketplace.visualstudio.com/items?itemName=kisstkondoros.vscode-gutter-preview. Then press on 'Download Extension' on the right hand side, download the file then inside your vscode open the command pallet (CTRL + Shift + p) and type: extensions install from vsix, click that command, then choose the .VSIX file you just downloaded.

  2. 最后,如果必须从github repo执行此操作,则在运行npm install并找到node_modules目录的目录中,运行npm run webpack-prod(在项目文件夹根目录的package.json文件中指定的命令,该命令描述了如何构建应用程序).然后,您应该在项目的./dist/extension目录中找到一个.VSIX文件,并对生成的.VSIX文件应用步骤2

Node.js相关问答推荐

如何在Node js中从MongoDB获取特定数据,使用GET方法?

如何使用MongoDB在Node.js 中向数组中添加项?

如何从shell脚本中计算ecmascript模块?

条件内的表达式

如何模拟 mysql2 `getConnection`

使用NodeJS通过服务账号列出Google Workspace用户

未捕获的错误: 只能用作 元素的子元素,永远不会直接呈现.请将您的 包裹在

如何解决未调用 Express 错误处理程序的问题

一个非常奇怪的JavaScript heap out of memory问题

用户与mongoose 的完美搭配

Node.js 大文件上传到 MongoDB 阻塞了事件循环和工作池

使用新react 18.0.0 的 create-react-app my-app redux 错误

响应发送 200 而不是 403

使用restify时如何支持cors

JSHint 是否支持异步/等待?

Node.js 中空函数的简写

为什么我会收到错误:解决方法指定过多?

node.js 在控制台上显示未定义

我应该如何在 webpack 中使用时刻时区?

node.js 找不到模块mongodb