shebaoting flarum can generate new theme color css arbitrarily without relying on node. what technology is used?
askvortsov shebaoting we use less variables, and css is recompiled every time variables change by the cache:clear command (or a listener).
shebaoting askvortsov Which php file is used to recompile the css? Can you give a hint? I'd like to learn a bit. Thanks.
askvortsov The asset compilation system is probably one of Flarum's most complicated, but here's a few hey parts: https://github.com/flarum/core/blob/ea291508ab954a04682927ebe3bfafbfb584e752/src/Frontend/FrontendServiceProvider.php#L1-L1 contains the list of sources; the Frontend extender registers new sources to the data structures defined here. This file also defines which less variables are passed in (they're encoded as a fake file). https://github.com/flarum/core/blob/ea291508ab954a04682927ebe3bfafbfb584e752/src/Frontend/Compiler/LessCompiler.php#L15-L15 is the actual class that compiles and assembles the less sources. https://github.com/flarum/core/blob/ea291508ab954a04682927ebe3bfafbfb584e752/src/Forum/ValidateCustomLess.php#L54-L54 triggers the rebuild