Nodejs: add some documentation of the dependencies

Fix #2220
This commit is contained in:
Olivier Goffart 2023-03-30 09:16:05 +02:00 committed by Olivier Goffart
parent 3ef634ebbc
commit 9a51114387
4 changed files with 30 additions and 4 deletions

View file

@ -6,6 +6,9 @@
Slint-node is the integration with node.
The complete Node documentation can be viewed online at https://slint-ui.com/docs/node/.
To get started you can use the [Walk-through tutorial](https://slint-ui.com/docs/tutorial/node).
We also have a [Getting Started Template](https://github.com/slint-ui/slint-nodejs-template) repository with
the code of a minimal application using Slint that can be used as a starting point to your program.
**Warning: Beta**
Slint-node is still in the early stages of development: APIs will change and important features are still being developed.
@ -18,6 +21,16 @@ Slint is available via NPM, so you can install by running the following command:
npm install slint-ui
```
### Dependencies
You need to install the following components:
* **[Node.js](https://nodejs.org/download/release/v16.19.1/)** (v16. Newer versions currently not supported: [#961](https://github.com/slint-ui/slint/issues/961))
* **[npm](https://www.npmjs.com/)**
* **[Rust compiler](https://www.rust-lang.org/tools/install)** (1.66 or newer)
You will also need a few more dependencies, see <https://github.com/slint-ui/slint/blob/master/docs/building.md#prerequisites>
## Using Slint
To initialize the API, you first need to import the `slint-ui` module in our code:
@ -144,4 +157,4 @@ component.model = model;
model.push(4); // this works
// does NOT work, getting the model does not return the right object
// component.model.push(5);
```
```

View file

@ -5,7 +5,9 @@
[Slint](https://slint-ui.com/) is a UI toolkit that supports different programming languages.
Slint-node is the integration with node.
The complete Node documentation can be viewed online at https://slint-ui.com/docs/node/.
To get started you can use the [Walk-through tutorial](https://slint-ui.com/docs/tutorial/node).
We also have a [Getting Started Template](https://github.com/slint-ui/slint-nodejs-template) repository with
the code of a minimal application using Slint that can be used as a starting point to your program.
**Warning: Beta**
Slint-node is still in the early stages of development: APIs will change and important features are still being developed.
@ -23,6 +25,16 @@ Slint is available via NPM, so you can install by running the following command:
npm install slint-ui
```
### Dependencies
You need to install the following components:
* **[Node.js](https://nodejs.org/download/release/v16.19.1/)** (v16. Newer versions currently not supported: [#961](https://github.com/slint-ui/slint/issues/961))
* **[npm](https://www.npmjs.com/)**
* **[Rust compiler](https://www.rust-lang.org/tools/install)** (1.66 or newer)
You will also need a few more dependencies, see <https://github.com/slint-ui/slint/blob/master/docs/building.md#prerequisites>
## Using Slint
To initialize the API, you first need to import the `slint-ui` module in our code:

View file

@ -47,7 +47,7 @@ To use Slint from C++, the following extra dependencies are needed:
To use Slint from Node.js, the following extra dependencies are needed.
- **[Node.js](https://nodejs.org/en/)** (including npm) At this time you will need to use the LTS version.
- **[Node.js](https://nodejs.org/en/)** (including npm) At this time you will need to use the version 16.
- **[Python](https://www.python.org)**
### Symlinks in the repository (Windows)

View file

@ -4,9 +4,10 @@ In this tutorial, we use JavaScript as the host programming language. We also su
[Rust](https://slint-ui.com/docs/rust/slint/) or [C++](https://slint-ui.com/docs/cpp/).
You'll need a development environment with [Node.js 16](https://nodejs.org/download/release/v16.19.1/) and [npm](https://www.npmjs.com/) installed. More recent
versions of NodeJS are currently not supported, for details check [Issue #2220](https://github.com/slint-ui/slint/issues/2220).
versions of NodeJS are currently not supported, for details check [Issue #961](https://github.com/slint-ui/slint/issues/961).
Since Slint is implemented in the Rust programming language, you also need to install a Rust compiler (1.66 or newer). You can easily install a Rust compiler
following the instruction from [the Rust website](https://www.rust-lang.org/learn/get-started).
You will also need some additional platform-specific dependencies, see <https://github.com/slint-ui/slint/blob/master/docs/building.md#prerequisites>
We're going to use `slint-ui` as `npm` dependency.