From 5b2b4b2994dc817b1fb50763f63d42463fb85157 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Tue, 16 May 2023 08:46:45 +0200 Subject: [PATCH] Update documentation for WebUI build --- glances/outputs/static/README.md | 38 +++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/glances/outputs/static/README.md b/glances/outputs/static/README.md index 011cd801..bac2decb 100644 --- a/glances/outputs/static/README.md +++ b/glances/outputs/static/README.md @@ -1,16 +1,44 @@ -# How to contribute? +# Focus on the Glances Web User Interface -In order to build the assets of the Web UI, you'll need [npm](https://docs.npmjs.com/getting-started/what-is-npm). +In order to build the assets of the Web UI, you'll need [NPM](https://docs.npmjs.com/getting-started/what-is-npm). + +NPM is a package manager for JavaScript related to [Node.js](https://nodejs.org/en/). + +NodeJS should be installed/updated on your system. + +## Pre-requisites + +### Install NodeJS + +Example on Ubuntu OS: + +```bash +sudo apt install nodejs +``` + +### Upgrade NodeJS + +Example on Ubuntu OS: + +```bash +sudo apt update +sudo apt install nodejs +sudo npm install -g n +sudo n lts +hash -r +``` + +## Build Glances WebUI You must run the following command from the `glances/outputs/static/` directory. -## Install dependencies +### Install dependencies ```bash $ npm ci ``` -## Build assets +### Build assets Run the build command to build assets once : @@ -24,7 +52,7 @@ or use the watch command to rebuild only modified files : $ npm run watch ``` -# Anatomy +## Anatomy ```bash static