mirror of
https://git.btclock.dev/btclock/webui.git
synced 2025-01-17 15:42:22 +01:00
Update README
This commit is contained in:
parent
654d97df9f
commit
1023218882
4 changed files with 25 additions and 20 deletions
4
.github/workflows/workflow.yml
vendored
4
.github/workflows/workflow.yml
vendored
|
@ -17,7 +17,9 @@ jobs:
|
|||
- name: Get changed files count
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v40.1.1
|
||||
|
||||
with:
|
||||
files_ignore: "doc/**,README.md,Dockerfile,.*,.github/**"
|
||||
files_ignore_separator: ','
|
||||
- name: Print changed files count
|
||||
run: >
|
||||
echo "Changed files count: ${{
|
||||
|
|
41
README.md
41
README.md
|
@ -1,38 +1,41 @@
|
|||
# create-svelte
|
||||
# BTClock WebUI
|
||||
|
||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
||||
[](https://github.com/btclock/webui2/actions/workflows/workflow.yml)
|
||||
|
||||
## Creating a project
|
||||
The web user-interface for the BTClock, based on Svelte-kit. It uses Bootstrap for the lay-out.
|
||||
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
|
||||
```bash
|
||||
# create a new project in the current directory
|
||||
npm create svelte@latest
|
||||
|
||||
# create a new project in my-app
|
||||
npm create svelte@latest my-app
|
||||
```
|
||||

|
||||

|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
After installed dependencies with `yarn`, start a development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
yarn dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
yarn dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
To create a production version of the WebUI:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
yarn build
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
Make sure the postinstall script is ran, because otherwise the filenames are to long for the LittleFS filesystem.
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||
## Deploying
|
||||
|
||||
To upload the firmware to the BTClock, you need to GZIP all the files. You can use the python script `gzip_build.py` for that.
|
||||
|
||||
Then you can make a `LittleFS.bin` with mklittlefs:
|
||||
|
||||
```bash
|
||||
mklittlefs -c build_gz -s 409600 littlefs.bin
|
||||
```
|
||||
|
||||
You can preview the production build with `yarn preview`.
|
BIN
doc/screenshot-dark.webp
Normal file
BIN
doc/screenshot-dark.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
BIN
doc/screenshot.webp
Normal file
BIN
doc/screenshot.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
Loading…
Add table
Reference in a new issue