To build the Pine Script v5 Language Server extension from source, follow these steps:
Before you begin, ensure you have the following installed:
- Node.js (which includes npm)
- Git
- Visual Studio Code
Clone the repository to your local machine using Git:
git clone https://github.com/FFriZ/Pine-Script-v5-VS-Code.git
cd Pine-Script-v5-VS-Codeor:
Within VS Code open the command palette by going to
view > command palette
or:
press CTRL+SHIFT+P
then:
type "clone" > press "Enter" > paste the repo url > select a dir location then open the new cloned repo when prompted.
Navigate to the cloned directory and install the necessary dependencies (If you used VS Code in step #1 then you will be in the cloned directory and can use the VS Code terminal press CTRL+` to show terminal):
npm installCompile the TypeScript code into JavaScript:
npm run compileOpen the folder in Visual Studio Code (Can skip if you are already in the dir inside of VS Code.):
code .In VS Code, press F5 to run the extension in a new Extension Development Host window.
If you want to package the extension into a .vsix file:
-
Install
vsce, the Visual Studio Code Extension CLI:npm install -g vsce
-
Package the extension:
vsce package
This will create a
.vsixfile in your directory that you can distribute or install manually using the Extensions view in VS Code.
- Make sure to update the version number in
package.jsonif you are making changes and plan to release a new version. - If you encounter any issues during the build process, check the
scriptssection ofpackage.jsonfor custom commands used by the project. - Refer to the
CONTRIBUTING.mdfile in the repository for more detailed instructions on contributing to the project.
By following these instructions, you should be able to successfully build the Pine Script v5 Language Server extension from source.