BCsabaEngine / svelteesp32

Convert Svelte (or React/Angular/Vue) JS application to serve it from ESP32/ESP8266 webserver
43 stars 6 forks source link

make etags, gzip a compile time option #16

Closed mhaberler closed 1 month ago

mhaberler commented 2 months ago

Hi @BCsabaEngine thanks for the great package! really appreciated.

If I may add a suggestion - neither substantial nor urgent:

move from build-time to compile time options - which will in many cases take out the build step (when testing or doing variants) - i.e: always generate code for Etags and compression support, but make it conditional with cpp symbols

thanks

Michael

BCsabaEngine commented 2 months ago

Would you like to use the options (etag, pre-zip) within cpp directives? Interrest request, I will investigate it. Thanks for idea!

mhaberler commented 2 months ago

yes, that is the idea size of the generate header doesnt really matter these days and it moves all the options to the build stage

in the case of a platformio, this also removes the need to pass build parameters to a pre: script

BCsabaEngine commented 1 month ago

With v1.3.x we are prepared to generate (and use it in future) c++ defines: https://github.com/BCsabaEngine/svelteesp32?tab=readme-ov-file#c-defines

BCsabaEngine commented 1 month ago

v1.4.0 released: https://github.com/BCsabaEngine/svelteesp32/releases/tag/v1.4.0

You can use: --etag=compiler --gzip=compiler command line args to create a (larger) .h file where c++ compiler directives are available: SVELTEESP32_ENABLE_ETAG and SVELTEESP32_ENABLE_GZIP

Give us feedback on whether it meets your expectations!

mhaberler commented 1 month ago

bravo!