svelteesp32 icon indicating copy to clipboard operation
svelteesp32 copied to clipboard

make etags, gzip a compile time option

Open mhaberler opened this issue 1 year ago • 4 comments

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

mhaberler avatar Jul 27 '24 18:07 mhaberler

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

BCsabaEngine avatar Jul 27 '24 19:07 BCsabaEngine

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

mhaberler avatar Jul 27 '24 19:07 mhaberler

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 avatar Aug 13 '24 21:08 BCsabaEngine

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!

BCsabaEngine avatar Aug 18 '24 19:08 BCsabaEngine

bravo!

mhaberler avatar Aug 21 '24 19:08 mhaberler