Static Function
Arguments
appRootDir: The full directory being used to compile the app.workingDir: The full working directory being used to compile the app. Typically/buildwithin the app root.themeConfig: Any theme-specific settings in theapp.jsconfig file under thethemeConfigkey.
Returns
String of the CSS needed to add to the bundle for this theme.
Effect
If your theme would like to add CSS to the bundle separately from what the individual components add, you would specify that here.
While it is still the early days of Erstwhile theme creation, it is quite common for general-purpose HTML themes to be adapted to work with Erstwhile. Most of these have their CSS generated through a preprocessor like SCSS. For these cases, this SCSS can be added to the theme’s /theme directory and then build within the working directory specified in the second argument at compile time.
The third argument lets you add custom configuration variables for your theme that a user could add to their application’s config file; for example, you may want to give theme a simple way to specify primary and secondary colors, or font sizes.
As this method does all of the compilation work and simply returns a (potentially giant) CSS string, you have a lot of latitude with how it does its work. Please see the sample Mazer theme for some ideas.
Note: This method is static and is called at compile time.