refactor: switch to deno
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
|
||||
## Overview
|
||||
|
||||
Official [Meshtastic](https://meshtastic.org) web interface, that can be hosted or served from a node
|
||||
Official [Meshtastic](https://meshtastic.org) web interface, that can be hosted
|
||||
or served from a node
|
||||
|
||||
**[Hosted version](https://client.meshtastic.org)**
|
||||
|
||||
@@ -19,7 +20,8 @@ Official [Meshtastic](https://meshtastic.org) web interface, that can be hosted
|
||||
|
||||
## Progress Web App Support (PWA)
|
||||
|
||||
Meshtastic Web Client now includes Progressive Web App (PWA) functionality, allowing users to:
|
||||
Meshtastic Web Client now includes Progressive Web App (PWA) functionality,
|
||||
allowing users to:
|
||||
|
||||
- Install the app on desktop and mobile devices
|
||||
- Access the interface offline
|
||||
@@ -35,8 +37,10 @@ PWA functionality works with both the hosted version and self-hosted instances.
|
||||
|
||||
## Self-host
|
||||
|
||||
The client can be self hosted using the precompiled container images with an OCI compatible runtime such as [Docker](https://www.docker.com/) or [Podman](https://podman.io/).
|
||||
The base image used is [Nginx 1.27](https://hub.docker.com/_/nginx)
|
||||
The client can be self hosted using the precompiled container images with an OCI
|
||||
compatible runtime such as [Docker](https://www.docker.com/) or
|
||||
[Podman](https://podman.io/). The base image used is
|
||||
[Nginx 1.27](https://hub.docker.com/_/nginx)
|
||||
|
||||
```bash
|
||||
# With Docker
|
||||
@@ -46,9 +50,11 @@ docker run -d -p 8080:8080 --restart always --name Meshtastic-Web ghcr.io/meshta
|
||||
podman run -d -p 8080:8080 --restart always --name Meshtastic-Web ghcr.io/meshtastic/web
|
||||
```
|
||||
|
||||
## Nightly releases
|
||||
## Nightly releases
|
||||
|
||||
Our nightly releases provide the latest development builds with cutting-edge features and fixes. These builds are automatically generated from the latest main branch every night and are available for testing and early adoption.
|
||||
Our nightly releases provide the latest development builds with cutting-edge
|
||||
features and fixes. These builds are automatically generated from the latest
|
||||
main branch every night and are available for testing and early adoption.
|
||||
|
||||
```bash
|
||||
# With Docker
|
||||
@@ -57,38 +63,55 @@ docker run -d -p 8080:8080 --restart always --name Meshtastic-Web ghcr.io/meshta
|
||||
podman run -d -p 8080:8080 --restart always --name Meshtastic-Web ghcr.io/meshtastic/web:nightly
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> - Nightly builds represent the latest development state and may contain breaking changes
|
||||
> - These builds undergo automated testing but may be less stable than tagged release versions
|
||||
> - Not recommended for production environments unless you are actively testing new features
|
||||
> [!WARNING]
|
||||
>
|
||||
> - Nightly builds represent the latest development state and may contain
|
||||
> breaking changes
|
||||
> - These builds undergo automated testing but may be less stable than tagged
|
||||
> release versions
|
||||
> - Not recommended for production environments unless you are actively testing
|
||||
> new features
|
||||
> - No guarantee of backward compatibility between nightly builds
|
||||
|
||||
### Version Information
|
||||
|
||||
Each nightly build is tagged with:
|
||||
|
||||
- The nightly tag for the latest build
|
||||
- A specific SHA for build reproducibility
|
||||
|
||||
### Feedback
|
||||
If you encounter any issues with nightly builds, please report them in our [issues tracker](https://github.com/meshtastic/web/issues). Your feedback helps improve the stability of future releases
|
||||
|
||||
If you encounter any issues with nightly builds, please report them in our
|
||||
[issues tracker](https://github.com/meshtastic/web/issues). Your feedback helps
|
||||
improve the stability of future releases
|
||||
|
||||
## Development & Building
|
||||
You'll need to download the package manager used with this repo. You can install it by visiting [Bun.sh](https://bun.sh/) and following the installation instructions.
|
||||
|
||||
### Debugging
|
||||
You'll need to download the package manager used with this repo. You can install
|
||||
it by visiting [deno.com](https://deno.com/) and following the installation
|
||||
instructions listed on the home page.
|
||||
|
||||
### Debugging
|
||||
|
||||
#### Debugging with React Scan
|
||||
Meshtastic Web Client has included the library [React Scan](https://github.com/aidenybai/react-scan) to help you identify and resolve render performance issues during development.
|
||||
|
||||
React's comparison-by-reference approach to props makes it easy to inadvertently cause unnecessary re-renders, especially with:
|
||||
Meshtastic Web Client has included the library
|
||||
[React Scan](https://github.com/aidenybai/react-scan) to help you identify and
|
||||
resolve render performance issues during development.
|
||||
|
||||
React's comparison-by-reference approach to props makes it easy to inadvertently
|
||||
cause unnecessary re-renders, especially with:
|
||||
|
||||
- Inline function callbacks (`onClick={() => handleClick()}`)
|
||||
- Object literals (`style={{ color: "purple" }}`)
|
||||
- Array literals (`items={[1, 2, 3]}`)
|
||||
|
||||
These are recreated on every render, causing child components to re-render even when nothing has actually changed.
|
||||
These are recreated on every render, causing child components to re-render even
|
||||
when nothing has actually changed.
|
||||
|
||||
Unlike React DevTools, React Scan specifically focuses on performance optimization by:
|
||||
Unlike React DevTools, React Scan specifically focuses on performance
|
||||
optimization by:
|
||||
|
||||
- Clearly distinguishing between necessary and unnecessary renders
|
||||
- Providing render counts for components
|
||||
@@ -96,10 +119,11 @@ Unlike React DevTools, React Scan specifically focuses on performance optimizati
|
||||
- Offering a dedicated performance debugging experience
|
||||
|
||||
#### Usage
|
||||
|
||||
When experiencing slow renders, run:
|
||||
|
||||
```bash
|
||||
bun run dev:scan
|
||||
deno task dev:scan
|
||||
```
|
||||
|
||||
This will allow you to discover the following about your components and pages:
|
||||
@@ -109,20 +133,21 @@ This will allow you to discover the following about your components and pages:
|
||||
- Expensive hook operations
|
||||
- Props that change reference on every render
|
||||
|
||||
Use these insights to apply targeted optimizations like `React.memo()`, `useCallback()`, or `useMemo()` where they'll have the most impact.
|
||||
Use these insights to apply targeted optimizations like `React.memo()`,
|
||||
`useCallback()`, or `useMemo()` where they'll have the most impact.
|
||||
|
||||
### Building and Packaging
|
||||
|
||||
Build the project:
|
||||
|
||||
```bash
|
||||
bun run build
|
||||
deno task build
|
||||
```
|
||||
|
||||
GZip the output:
|
||||
|
||||
```bash
|
||||
bun run package
|
||||
deno task package
|
||||
```
|
||||
|
||||
### Development
|
||||
@@ -130,11 +155,11 @@ bun run package
|
||||
Install the dependencies.
|
||||
|
||||
```bash
|
||||
bun i
|
||||
deno i
|
||||
```
|
||||
|
||||
Start the development server:
|
||||
|
||||
```bash
|
||||
bun run dev
|
||||
deno task dev
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user