Skip to content

Commit 91cffef

Browse files
Merge pull request #481 from ioBroker/update-packages
2 parents 8477ba0 + 38d9f8d commit 91cffef

19 files changed

+17939
-12607
lines changed

.eslintrc.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

.npmignore

Lines changed: 0 additions & 12 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
2+
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "streetsidesoftware.code-spell-checker"]
33
}

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Changelog
22
<!--
33
Placeholder for the next version (at the beginning of the line):
4-
## __WORK IN PROGRESS__
4+
## **WORK IN PROGRESS**
55
-->
6+
## **WORK IN PROGRESS**
7+
* (@GermanBluefox) Packages were updated
8+
69
## 0.7.3 (2024-05-02)
710
* (foxriver76) set `activeRepo` as an array as it is intended
811

912
## 0.7.2 (2024-03-26)
10-
* (stevenengland) Add support for jsonconfig json5 files hot reload
13+
* (stevenengland) Add support for jsonConfig json5 files hot reload
1114

1215
## 0.7.1 (2023-11-09)
1316
* (Apollon77) downgrade boxen again to fix problems with it

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021-2024 UncleSamSwiss
3+
Copyright (c) 2021-2025 UncleSamSwiss
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
[![NPM version](https://img.shields.io/npm/v/@iobroker/dev-server.svg)](https://www.npmjs.com/package/@iobroker/dev-server)
44
[![Downloads](https://img.shields.io/npm/dm/@iobroker/dev-server.svg)](https://www.npmjs.com/package/@iobroker/dev-server)
55

6-
ioBroker dev-server is a simple command line tool running on Windows, Linux and MacOS that allows you to quickly develop and test ioBroker adapters and their admin interface.
6+
ioBroker dev-server is a simple command line tool running on Windows, Linux and macOS that allows you to quickly develop and test ioBroker adapters and their admin interface.
77

8-
**Note:** dev-server requires at least Node.js 14.
8+
> [!NOTE]
9+
> dev-server requires at least Node.js 14.
910
1011
## Installation
1112

@@ -16,12 +17,12 @@ dev-server watch
1617
```
1718
(a local installation as dev-dependency is also possible)
1819

19-
**Note for windows users:**
20-
If dev-server command is not found, check that the npm directory (typically ;C:\Users\%username%\AppData\Roaming\npm) is included into the PATH variable
20+
> [!TIP]
21+
> If the `dev-server` command is not found **under Windows**, check that the npm directory (typically `C:\Users\%username%\AppData\Roaming\npm`) is included in the `PATH` variable.
2122
2223
## Features
2324

24-
- Runs on all operating systems supported by NodeJS and ioBroker
25+
- Runs on all operating systems supported by Node.js and ioBroker
2526
- Support for HTML and React UI
2627
- Support for JavaScript and TypeScript adapters
2728
- Hot reload of Admin UI upon any changes to HTML and JavaScript files.
@@ -42,31 +43,34 @@ It is possible to run `dev-server` in the root directory of your local copy of [
4243
You need to install the `dev-server` package as well as set it up it in the adapter directory.
4344

4445
### Install package
45-
*Before installing please check the following what is the best way or recommended:*
46+
*Before installing, please check the following what is the best way or recommended:*
4647

4748

48-
1. Linux
49+
#### Linux
4950
* install it as a dev-dependency of your adapter (recommended)
5051
* install this tool as a global tool
5152

52-
Under Linux it is sometimes useful to install this tool as global BUT best practice for developing an own adapter it is better to install it as dev-dependency
53+
Under Linux, it is sometimes useful to install this tool as global, BUT best practice for developing an own adapter it is better to install it as dev-dependency
5354

54-
2. MacOS
55-
* Under MacOS be careful with installation as global. This is not recommended so better to install it as dev-depency
55+
#### MacOS
56+
* Under macOS, be careful with installation as global. This is not recommended so better to install it as a dev-dependency
5657

57-
3. Windows
58+
#### Windows
5859

59-
* Under Windows a global install is no problem.
60+
* Under Windows, a global installation is no problem.
6061

61-
**Note:** dev-server requires at least Node.js 14.
62+
> [!NOTE]
63+
> dev-server requires at least Node.js 14.
6264
63-
how to nstall it globally:
65+
How to install it globally:
6466

6567
```bash
6668
npm install --global @iobroker/dev-server
6769
```
6870

69-
Some more explanation, especially when a **global installation** is problematic **because of permission** issues (e.g. on **MacOS**), you can add the dev-server to your adapter's `devDependencies` and add it e.g. as a script to your package.json.
71+
#### Installation as a development dependency
72+
73+
Some more explanation, especially when a **global installation** is problematic **because of permission** issues (e.g., on **macOS**), you can add the dev-server to your adapter's `devDependencies` and add it e.g., as a script to your package.json.
7074

7175
```json
7276
{
@@ -89,13 +93,14 @@ To set up and configure a local dev-server in your adapter directory, change to
8993
dev-server setup
9094
```
9195

92-
For additional command line arguments, see blow.
96+
For additional command line arguments, see below.
9397

94-
_Note:_ the executable can either be called with the short name `dev-server` or its full name `iobroker-dev-server`. We will use the first way in this document.
98+
> [!NOTE]
99+
> The executable can either be called with the short name `dev-server` or its full name `iobroker-dev-server`. We will use the first way in this document.
95100
96101
### Exclude temporary folder
97102

98-
By default dev-server creates a temporary directory called `.dev-server` in your adapter directory where all data is stored. This directory must be excluded from NPM and Git.
103+
By default, dev-server creates a temporary directory called `.dev-server` in your adapter directory where all data is stored. This directory must be excluded from NPM and Git.
99104

100105
Your `.gitignore` file must be extended with a single additional line:
101106

@@ -121,7 +126,7 @@ The following global options are available for all commands:
121126

122127
### Profiles
123128

124-
All commands (except of course `dev-server profile`) support the `[profile]` command line argument. It allows the user to use choose between different profiles.
129+
All commands (except of course `dev-server profile`) support the `[profile]` command line argument. It allows the user to choose between different profiles.
125130

126131
Each profile is a completely independent instance of ioBroker and can run in parallel with other profiles of the same adapter (if different ports are configured).
127132

@@ -137,7 +142,7 @@ Set up dev-server in the current directory. This should always be called in the
137142

138143
The following options are available:
139144

140-
`--adminPort <number>` TCP port on which ioBroker.admin will be available (default: 8081). This port number is also used to generate all other port numbers required to run dev-server. This allows multiple instances of dev-server to run in parallel. It is suggested to use ports in the range of 8000-9999. If you experience connection problems, try a different port.
145+
`--adminPort <number>` TCP port on which `ioBroker.admin` will be available (default: 8081). This port number is also used to generate all other port numbers required to run dev-server. This allows multiple instances of dev-server to run in parallel. It is suggested to use ports in the range of 8000-9999. If you experience connection problems, try a different port.
141146

142147
`--jsController <version>` Define which version of js-controller to be used (default: "latest").
143148

@@ -157,9 +162,10 @@ If you start the adapter from Admin, be aware that it will use the code uploaded
157162

158163
Run dev-server and start the adapter in "watch" mode.
159164

160-
The adapter will automatically restart when its source code changes (with a 2 seconds delay).
165+
The adapter will automatically restart when its source code changes (with a 2-seconds delay).
161166

162-
**DO NOT** start the adapter manually in ioBroker.admin! If you see errors like ADAPTER_ALREADY_RUNNING then most likely you ignored this info :-)
167+
> [!IMPORTANT]
168+
> **DO NOT** start the adapter manually in `ioBroker.admin`! If you see errors like `ADAPTER_ALREADY_RUNNING` then most likely you ignored this info :-)
163169
164170
You may attach a debugger to the running adapter. Keep in mind that the debugger will be detached when you change your source code, you need to manually attach again to the new process. Watch the console output for the correct process id to attach to.
165171

@@ -211,7 +217,7 @@ Lists all available profiles with their meta-data.
211217

212218
## IDEs
213219

214-
You can of course use dev-server together with you preferred IDE.
220+
You can, of course, use dev-server together with your preferred IDE.
215221

216222
The following chapters all assume you have dev-server installed and set up correctly (see above).
217223

@@ -239,7 +245,7 @@ When the adapter is ready, you will see a message like the following:
239245

240246
You can now attach the Visual Studio Code debugger to the given process ID:
241247

242-
- Open the Command Pallette (Ctrl-Shift-P)
248+
- Open the Command Palette (Ctrl-Shift-P)
243249
- Choose "Debug: Attach to Node Process (legacy)"
244250
- Select the right process, it usually looks like follows:
245251

@@ -248,7 +254,7 @@ node --inspect <path to your dev-server directory>/node_modules/...
248254
process id: 1234, debug port: 9229
249255
```
250256

251-
Now you can set breakpoints (or they are hit, if you set them before) and inspect your adapter while running.
257+
Now you can set breakpoints (or they are hit if you set them before) and inspect your adapter while running.
252258

253259
#### Launch adapter independently
254260

@@ -292,11 +298,11 @@ Take note of the two paths and create (or extend) a file called `.vscode/launch.
292298

293299
You may now launch this configuration with "Start Debugging" (F5).
294300

295-
### Webstorm
301+
### WebStorm
296302

297-
Depending on your preferences, you can either start the adapter with dev-server and then attach your debugger or you can start dev-server and then launch the adapter from Webstorm. Both setups are explained below.
303+
Depending on your preferences, you can either start the adapter with dev-server and then attach your debugger, or you can start dev-server and then launch the adapter from WebStorm. Both setups are explained below.
298304

299-
In order to improve performance of Webstorm, I recommend to exclude the .dev-server directory from the context menu (see screenshot). This will prevent Webstorm from indexing the directory, which could take some time.
305+
In order to improve the performance of WebStorm, I recommend excluding the `.dev-server` directory from the context menu (see screenshot). This will prevent WebStorm from indexing the directory, which could take some time.
300306

301307
![Exclude .dev-server directory](docs/images/webstorm-exclude-dir.jpg)
302308

@@ -306,13 +312,13 @@ Now cancel the exclusion for the adapter directory in .dev-server\default\node_m
306312

307313
#### Attach to dev-server
308314

309-
If you want dev-server to take care of the adapter by building (if needed), uploading, running and relaunching upon changes, start it from the built-in Terminal in Webstorm:
315+
If you want dev-server to take care of the adapter by building (if needed), uploading, running and relaunching upon changes, start it from the built-in Terminal in WebStorm:
310316

311317
```bash
312318
dev-server watch
313319
```
314320

315-
Setup a launch configuration to attach to the process like this:
321+
Set up a launch configuration to attach to the process like this:
316322

317323
![Attach to running process](docs/images/webstorm-attach.jpg)
318324

@@ -326,7 +332,7 @@ When the adapter is ready, you will see a message like the following:
326332
╰──────────────────────────────────────────────────╯
327333
```
328334

329-
You can now start the attach configuration and use the debugger console as usual.
335+
You can now start the `attach` configuration and use the debugger console as usual.
330336

331337
#### Launch adapter independently
332338

@@ -349,8 +355,8 @@ When dev-server is ready, you will see a message like the following:
349355
╰──────────────────────────────────────────────────────────────────────────╯
350356
```
351357

352-
Take note of the paths and setup a launch configuration like in the screenshot below:
358+
Take note of the paths and set up a launch configuration like in the screenshot below:
353359

354360
![Run or debug adapter](docs/images/webstorm-debug.jpg)
355361

356-
Now you can run / debug and restart the process from Webstorm and changes will automatically be synced.
362+
Now you can run / debug and restart the process from WebStorm, and changes will automatically be synced.

0 commit comments

Comments
 (0)