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-Code
or:
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 install
Compile the TypeScript code into JavaScript:
npm run compile
Open 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
.vsix
file 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.json
if you are making changes and plan to release a new version. - If you encounter any issues during the build process, check the
scripts
section ofpackage.json
for custom commands used by the project. - Refer to the
CONTRIBUTING.md
file 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.