is there a way to add a step before the normal arduino preprocessor starts its work?
Some background information:
I'm using arduino IDE for ESP8266 dev work where the esp is serving websites.
I'd like to use .css .js and .html files within the arduino project folder and minify them and generate a temp .ino file where the content of each file is set as a variable value.
but I'm guessing recipe.hooks.sketch.prebuild.NUMBER.pattern actually happens after the sketch preprocessing. Is that correct?
I don't see any reason why you would need your generated file to be run through the preprocessor though. How about turn it into a .h file and copy it to the temporary build folder. It would be brought into your sketch by an include of the generated .h file. If you do that then recipe.hooks.sketch.prebuild.NUMBER.pattern should work fine for your needs.
I'd be interested to hear how it goes. It sounds like a cool project. I don't see these hooks used very often but it's nice the Arduino developers added them.