You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+111Lines changed: 111 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ In order to be able to easily update OTA, it is important - from the users' poin
12
12
13
13
This npm package provides a solution for **inserting any JS client application into the ESP web server** (PsychicHttp and also ESPAsyncWebServer (https://github.com/ESP32Async/ESPAsyncWebServer) and ESP-IDF available, PsychicHttp is the default). For this, JS, html, css, font, assets, etc. files must be converted to binary byte array. Npm mode is easy to use and easy to **integrate into your CI/CD pipeline**.
14
14
15
+
> Starting with version v1.12.0, you can use .rc file to config
16
+
15
17
> Starting with version v1.11.0, you can exclude files by pattern
16
18
17
19
> Starting with version v1.10.0, we reduced npm dependencies
@@ -427,8 +429,117 @@ You can use the following c++ directives at the project level if you want to con
427
429
|`--version`| Include a version string in generated header, e.g. `--version=v$npm_package_version`| '' |
428
430
|`--espmethod`| Name of generated initialization method |`initSvelteStaticFiles`|
429
431
|`--define`| Prefix of c++ defines (e.g., SVELTEESP32_COUNT) |`SVELTEESP32`|
432
+
|`--config`| Use custom RC file path |`.svelteesp32rc.json`|
430
433
|`-h`| Show help ||
431
434
435
+
### Configuration File
436
+
437
+
You can store frequently-used options in a configuration file to avoid repeating command line arguments. This is especially useful for CI/CD pipelines and team collaboration.
438
+
439
+
#### Quick Start
440
+
441
+
Create `.svelteesp32rc.json` in your project directory:
442
+
443
+
```json
444
+
{
445
+
"engine": "psychic",
446
+
"sourcepath": "./dist",
447
+
"outputfile": "./esp32/include/svelteesp32.h",
448
+
"etag": "true",
449
+
"gzip": "true",
450
+
"cachetime": 86400,
451
+
"exclude": ["*.map", "*.md"]
452
+
}
453
+
```
454
+
455
+
Then simply run:
456
+
457
+
```bash
458
+
npx svelteesp32
459
+
```
460
+
461
+
No command line arguments needed!
462
+
463
+
#### Search Locations
464
+
465
+
The tool automatically searches for `.svelteesp32rc.json` in:
466
+
467
+
1. Current working directory
468
+
2. User home directory
469
+
470
+
Or specify a custom location:
471
+
472
+
```bash
473
+
npx svelteesp32 --config=.svelteesp32rc.prod.json
474
+
```
475
+
476
+
#### Configuration Reference
477
+
478
+
All CLI options can be specified in the RC file using long-form property names:
-**How big a frontend application can be placed?** If you compress the content with gzip, even a 3-4Mb assets directory can be placed. This is a serious enough amount to serve a complete application.
0 commit comments