Implement JavaScript Pro-Code Project

Prerequisites

Node.js

Currently only Node.js 12.16.x is supported.

Further information: Node.js

ESLint

A tool used to check the quality of the code.

Further information: ES Lint

EditorConfig

This is used to overwrite the settings of the user workspace in VS Code (IDE).

Further information: Visual Studio Marketplace

Running/Building Projects

Create Pro-Code Projects

Open Solution Designer and create a new project by clicking on the Create button. Fill out the project-specific details but from the Type drop-down make sure to select Pro-Code Project and set Implementation Language to JavaScript. Once this is created the project should appear in the Solution Designer. Optional: Open that project in Solution Designer and write a proper documentation.

Clone Git Project to Local Machine

In order to build and run the project, the Git project should be cloned to the user's workspace. In order to checkout a Pro-Code Project open the project after creation, navigate to the General Information and copy the Git Repository URI.

  1. Alter the URL and add the Git user so it looks like the following:

    • Before: https://auto-devops-url/managed-solutions/SOLTSgit

    • After: https://git@auto-devops-url/managed-solutions/SOLTS.git

  2. Open a terminal and clone the project. You will be prompted for a password. Please use your personal access token as password:

    git clone https://git@auto-devops-url/managed-solutions/SOLTS.git
Note: In order to be able to interact with the Git repository you have to provide the credentials for your Git system in advance.

Install Dependencies

In order to install all the needed dependencies to run a Pro-Code JavaScript Project on a local machine this command needs to be run in the project directory:

npm install

Unit Tests for Pro-Code Projects

It's highly recommended to write unit tests for your JavaScript projects. The unit tests will be executed during the project pipeline execution.