Skip to content

Commit e8fc745

Browse files
committed
fix: readme
1 parent 2198a1a commit e8fc745

File tree

2 files changed

+28
-15
lines changed

2 files changed

+28
-15
lines changed

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ The content of **generated file** (do not edit, just use)
107107
```c
108108
#define SVELTEESP32_COUNT 5
109109
#define SVELTEESP32_SIZE 145633
110-
#define SVELTEESP32_FILE_index_html
110+
#define SVELTEESP32_FILE_INDEX_HTML
111+
#define SVELTEESP32_HTML_FILES 1
111112
...
112113
113114
const uint8_t data0[12547] = {0x1f, 0x8b, 0x8, 0x0, ...
@@ -189,30 +190,42 @@ You can use the COUNT and SIZE constants:
189190
...
190191
```
191192

192-
You can include a warning if a named file accidentally missing from the build:
193+
You can include a blocker error if a named file accidentally missing from the build:
193194

194195
```c
195196
...
196197
#include "svelteesp32.h"
197198

198-
#ifndef SVELTEESP32_FILE_index_html
199+
#ifndef SVELTEESP32_FILE_INDEX_HTML
199200
#error Missing index file
200201
#endif
201202
...
202203
```
203204

205+
...or if there are too many of a file type:
206+
207+
```c
208+
...
209+
#include "svelteesp32.h"
210+
211+
#if SVELTEESP32_CSS_FILES > 1
212+
#error Too many CSS files
213+
#endif
214+
...
215+
```
216+
204217
### Command line options
205218

206-
| Option | Required | Description | default |
207-
| ------------- | :------: | ---------------------------------------------------------------- | ----------------------- |
208-
| `-e` | x | The engine for which the include file is created (psychic/async) | psychic |
209-
| `-s` | x | Source dist folder contains compiled web files | |
210-
| `-o` | x | Generated output file with path | `svelteesp32.h` |
211-
| `--etag` | | Use ETag header for cache | false |
212-
| `--no-gzip` | | Do not compress content with gzip | false -> gzip used |
213-
| `--espmethod` | x | Name of generated method | `initSvelteStaticFiles` |
214-
| `--define` | x | Prefix of c++ defines | `SVELTEESP32` |
215-
| `-h` | | Show help | |
219+
| Option | Description | default |
220+
| ------------- | --------------------------------------------------------- | ----------------------- | ------- |
221+
| `-s` | **Source dist folder contains compiled web files** | |
222+
| `-e` | The engine for which the include file is created [psychic | async] | psychic |
223+
| `-o` | Generated output file with path | `svelteesp32.h` |
224+
| `--etag` | Use ETag header for cache | false |
225+
| `--no-gzip` | Do not compress content with gzip | false -> gzip used |
226+
| `--espmethod` | Name of generated method | `initSvelteStaticFiles` |
227+
| `--define` | Prefix of c++ defines | `SVELTEESP32` |
228+
| `-h` | Show help | |
216229

217230
### Q&A
218231

demo/esp32/src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#endif
1414

1515
#if SVELTEESP32_CSS_FILES > 1
16-
#error Too much CSS files
16+
#error Too many CSS files
1717
#endif
1818

1919
AsyncWebServer server(80);
@@ -39,7 +39,7 @@ void loop() {}
3939
#endif
4040

4141
#if SVELTEESP32_CSS_FILES > 1
42-
#error Too much CSS files
42+
#error Too many CSS files
4343
#endif
4444

4545
PsychicHttpServer server;

0 commit comments

Comments
 (0)