From bd13fd2f27907029d2708142a1d60415184c5fea Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 2 Feb 2022 14:25:20 +0100 Subject: [PATCH] Rename npm package to slint-ui and fix up docs --- api/node/README.md | 34 +++++++++++----------- api/node/package.json | 2 +- examples/memory/main.js | 2 +- examples/memory/package.json | 2 +- examples/printerdemo/node/main.js | 2 +- examples/printerdemo/node/package.json | 2 +- examples/printerdemo_old/node/main.js | 2 +- examples/printerdemo_old/node/package.json | 2 +- examples/todo/node/main.js | 2 +- examples/todo/node/package.json | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/api/node/README.md b/api/node/README.md index 600bdeccf0..32977140d0 100644 --- a/api/node/README.md +++ b/api/node/README.md @@ -1,29 +1,29 @@ -# SixtyFPS-node +# Slint-node -[![npm](https://img.shields.io/npm/v/sixtyfps)](https://www.npmjs.com/package/sixtyfps) +[![npm](https://img.shields.io/npm/v/slint-ui)](https://www.npmjs.com/package/slint-ui) -[SixtyFPS](https://sixtyfps.io/) is a UI toolkit that supports different programming languages. -SixtyFPS-node is the integration with node. +[Slint](https://sixtyfps.io/) is a UI toolkit that supports different programming languages. +Slint-node is the integration with node. -The complete C++ documentation can be viewed online at https://sixtyfps.io/docs/node/. +The complete Node documentation can be viewed online at https://sixtyfps.io/docs/node/. **Warning: Pre-Alpha** -SixtyFPS is still in the early stages of development: APIs will change and important features are still being developed. +Slint is still in the early stages of development: APIs will change and important features are still being developed. -## Installing SixtyFPS +## Installing Slint -SixtyFPS is available via NPM, so you can install by running the following command: +Slint is available via NPM, so you can install by running the following command: ```sh -npm install sixtyfps +npm install slint-ui ``` -## Using SixtyFPS +## Using Slint -To initialize the API, you first need to import the `slint` module in our code: +To initialize the API, you first need to import the `slint-ui` module in our code: ```js -let slint = require("slint"); +let slint = require("slint-ui"); ``` This step also installs a hook in NodeJS that allows you to import `.slint` files directly: @@ -32,10 +32,10 @@ This step also installs a hook in NodeJS that allows you to import `.slint` file let ui = require("../ui/main.slint"); ``` -Combining these two steps leads us to the obligator "Hello World" example: +Combining these two steps leads us to the obligatory "Hello World" example: ```js -require("slint"); +require("slint-ui"); let ui = require("../ui/main.slint"); let main = new ui.Main(); main.run(); @@ -51,7 +51,7 @@ The exported component is exposed as a type constructor. The type constructor ta an object which allow to initialize the value of public properties or callbacks. ```js -require("slint"); +require("slint-ui"); // In this example, the main.slint file exports a module which // has a counter property and a clicked callback let ui = require("ui/main.slint"); @@ -105,7 +105,7 @@ If the array was set within the .slint file, the array can be obtained ```js component.model = [1, 2, 3]; // component.model.push(4); // does not work, because it operate on a copy -// but re-assigning work +// but re-assigning works component.model = component.model.concat(4); ``` @@ -121,7 +121,7 @@ When such an object is set to a model property, it gets a new `notify` object wi * `rowAdded(index, count)`: notify the view that rows were added. * `rowRemoved(index, count)`: notify the view that a row were removed. -As an example, here is the implementation of the `ArrayModel` (which is available on `sixtyfps.ArrayModel`) +As an example, here is the implementation of the `ArrayModel` (which is available as `slint.ArrayModel`) ```js let array = [1, 2, 3]; diff --git a/api/node/package.json b/api/node/package.json index 3b5f9fc22b..5523de25d6 100644 --- a/api/node/package.json +++ b/api/node/package.json @@ -1,5 +1,5 @@ { - "name": "slint", + "name": "slint-ui", "version": "0.2.0", "homepage": "https://github.com/sixtyfpsui/sixtyfps", "license": "SEE LICENSE IN LICENSE.md", diff --git a/examples/memory/main.js b/examples/memory/main.js index d8df8cb65e..1cba05d87f 100755 --- a/examples/memory/main.js +++ b/examples/memory/main.js @@ -2,7 +2,7 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial) -let slint = require("slint"); +let slint = require("slint-ui"); let ui = require("./memory.slint"); let window = new ui.MainWindow(); diff --git a/examples/memory/package.json b/examples/memory/package.json index e5adee83a3..172daf7285 100644 --- a/examples/memory/package.json +++ b/examples/memory/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "main": "main.js", "dependencies": { - "slint": "../../api/node" + "slint-ui": "../../api/node" }, "scripts": { "start": "node ." diff --git a/examples/printerdemo/node/main.js b/examples/printerdemo/node/main.js index e52ccfdff0..e831195272 100755 --- a/examples/printerdemo/node/main.js +++ b/examples/printerdemo/node/main.js @@ -3,7 +3,7 @@ // SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial) const path = require("path"); -let slint = require("slint"); +let slint = require("slint-ui"); let demo = require("../ui/printerdemo.slint"); let window = new demo.MainWindow(); diff --git a/examples/printerdemo/node/package.json b/examples/printerdemo/node/package.json index 7fff8b9709..69a9258b19 100644 --- a/examples/printerdemo/node/package.json +++ b/examples/printerdemo/node/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "main": "main.js", "dependencies": { - "slint": "../../../api/node" + "slint-ui": "../../../api/node" }, "scripts": { "start": "node ." diff --git a/examples/printerdemo_old/node/main.js b/examples/printerdemo_old/node/main.js index 8d1e237224..8f43b8d668 100755 --- a/examples/printerdemo_old/node/main.js +++ b/examples/printerdemo_old/node/main.js @@ -3,7 +3,7 @@ // SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial) // import "slint"; -require("slint"); +require("slint-ui"); // import * as demo from "../ui/printerdemo.slint"; let demo = require("../ui/printerdemo.slint"); let window = new demo.MainWindow(); diff --git a/examples/printerdemo_old/node/package.json b/examples/printerdemo_old/node/package.json index 7fff8b9709..69a9258b19 100644 --- a/examples/printerdemo_old/node/package.json +++ b/examples/printerdemo_old/node/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "main": "main.js", "dependencies": { - "slint": "../../../api/node" + "slint-ui": "../../../api/node" }, "scripts": { "start": "node ." diff --git a/examples/todo/node/main.js b/examples/todo/node/main.js index 8fdd5dfd2f..0cedb83905 100755 --- a/examples/todo/node/main.js +++ b/examples/todo/node/main.js @@ -3,7 +3,7 @@ // SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial) // import "slint"; -let slint = require("slint"); +let slint = require("slint-ui"); // import * as demo from "../ui/todo.slint"; let demo = require("../ui/todo.slint"); let app = new demo.MainWindow(); diff --git a/examples/todo/node/package.json b/examples/todo/node/package.json index 43d3595566..d1f3c6642f 100644 --- a/examples/todo/node/package.json +++ b/examples/todo/node/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "main": "main.js", "dependencies": { - "slint": "../../../api/node" + "slint-ui": "../../../api/node" }, "scripts": { "start": "node ."