-
Notifications
You must be signed in to change notification settings - Fork 34
Build
You can build the VS Code extension
yourself to experience the latest features and bugs without donating.
Node.js is the runtime required for building the language server.
You can download it from the official website: https://nodejs.org/en/download. LTS version should be good enough.
You can clone the repositories if you have Git installed:
git clone https://github.com/SPGoding/datapack-language-server.git
git clone https://github.com/SPGoding/vscode-datapack-helper-plus.git
The datapack-language-server
repository stores the code of the language server, while vscode-datapack-helper-plus
stores the code of the VS Code extension.
- Go in both repositories and execute
npm i
individually, which will install the necessary node modules for the language server and the extension to run. - Go in your local
datapack-language-server
repository, executenpm run build
andnpm link
. - Switch to your local
vscode-datapack-helper-plus
repository, executenpm link @spgoding/datapack-language-server
.
You can start the extension in VS Code directly while developing.
- Go in your local
datapack-language-server
repository. - Run
npm run build
. The TypeScript code will be compiled to JavaScript. Alternatively you can runnpm run watch
which keeps compiling the code as long as you make changes to the TypeScript code. - Switch to your local
vscode-datapack-helper-plus
repository. - Open VS Code there.
- Press F5.
You can also start the extension by packaging it with vsce. You can distribute the packaged extension to others.
vsce, short for "Visual Studio Code Extensions", is a command-line tool for packaging, publishing and managing VS Code extensions. -- VS Code's documentation
You can install vsce by running:
npm install -g vsce
- Go in your local
datapack-language-server
repository. - Run
npm run build
. The TypeScript code will be compiled to JavaScript. Alternatively you can runnpm run watch
which keeps compiling the code as long as you make changes to the TypeScript code. - Switch to your local
vscode-datapack-helper-plus
repository. - Run
npm run build
. - Run
vsce package
.
After a few minutes, you will get a packaged extension named datapack-language-server-VERSION.vsix
in the root directory. You can now install the vsix
file to play with it.