Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Reviewed BUILD.md file #149

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 37 additions & 16 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,74 @@
# BUILD

Environment and build specifications of the `horusec-vscode-plugin` project.
# **BUILD**

## Environment
## **Table of contents**
### 1. [**About**](#about)
### 2. [**Environment**](#environment)
### 3. [**Development**](#development)
>#### 3.1. [**Install and Run**](#install-and-run)
>#### 3.2. [**Style Guide**](#style-guide)
>#### 3.3. [**Security**](#security)
### 4. [**Production**](#production)
>#### 4.1. [**Publish an extension**](#publish-an-extension)


## **About**
The **BUILD.md** is a file to check the environment and build specifications of **`horusec-vscode-plugin`** project.


## **Environment**

- **vscode**: ^1.51.X
- **npm**: 6.x
- **node**: 8.x

## Development
## **Development**

For the development of the extension, we use the official [Extension API](https://code.visualstudio.com/api).
We use [**Extension API**](https://code.visualstudio.com/api) for the extension's development.

### Install and Run
### **Install and Run**

To install the dependencies, you must run the following command at the root of the project:
To install the dependencies, run the command at the root of the project:

```bash
npm install
```

In order to visualize the extension in development mode, you must use the editor [Visual Studio code](https://code.visualstudio.com/) and then run the project using debug via the **`F5`** key or through the **`Run and Debug`** tab.
- If you want to see the extension in development mode, use [**Visual Studio code**](https://code.visualstudio.com/) and run the project using debug via the **`F5`** key or through the **`Run and Debug`** tab.

### Style Guide
### **Style Guide**

In this project, the tool [Eslint](https://eslint.org/) is used for code standardization. You can check if your changes are in accordance with our style guide, through the command:
The tool [**Eslint**](https://eslint.org/) is used for code standardization in this project. You can check if your changes are in accordance with our Style Guide, run the following command:

```bash
npm run lint
```

### Security
### **Security**

To maintain a secure codebase, we use the [Horusec](https://horusec.io/site/) CLI, to facilitate installation and execution, we create a `Make` command.
We use [**Horusec**](https://horusec.io/site/) CLI to maintain a secure codebase.

To make your installation and execution easier, we created a `Make` command, run:

```bash
make security
```

## Production
## **Production**

To deploy in production, you need the npm package [vsce](https://www.npmjs.com/package/vsce) installed globally.
You need the npm package [**vsce**](https://www.npmjs.com/package/vsce) installed globally to deploy in production, run the command below:

```bash
npm install -g vsce
```

To publish the extension on the [VSCode Marketplace](https://marketplace.visualstudio.com/vscode) it is necessary to generate an [access token](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token), and then execute the command below, informing the generated token.
### **Publish an extension**
To publish the extension on the [**VSCode Marketplace**](https://marketplace.visualstudio.com/vscode), follow the steps:

**Step 1.** Generate an [**access token**](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token);

**Step 2.** Run the command below, informing the generated token:

```bash
vsce publish -p $YOUR_MARKETPLACE_TOKEN
```
```