@@ -107,7 +107,8 @@ The content of **generated file** (do not edit, just use)
107
107
```c
108
108
#define SVELTEESP32_COUNT 5
109
109
#define SVELTEESP32_SIZE 145633
110
- #define SVELTEESP32_FILE_index_html
110
+ #define SVELTEESP32_FILE_INDEX_HTML
111
+ #define SVELTEESP32_HTML_FILES 1
111
112
...
112
113
113
114
const uint8_t data0[12547] = {0x1f, 0x8b, 0x8, 0x0, ...
@@ -189,30 +190,42 @@ You can use the COUNT and SIZE constants:
189
190
...
190
191
```
191
192
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:
193
194
194
195
``` c
195
196
...
196
197
#include " svelteesp32.h"
197
198
198
- #ifndef SVELTEESP32_FILE_index_html
199
+ #ifndef SVELTEESP32_FILE_INDEX_HTML
199
200
#error Missing index file
200
201
#endif
201
202
...
202
203
```
203
204
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
+
204
217
### Command line options
205
218
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 | |
216
229
217
230
### Q&A
218
231
0 commit comments