Conversation
State is bad. This method allows to prevent leaking compiler configuration across multiple unrelated compilation processes.
This change stops the `Compressed` formatter from removing the comment, allowing us to remove the `insertHeader()` logic which looked somewhat fragile.
af129f0 to
6e601c0
Compare
6e601c0 to
63f055f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR performs a cleanup within the StyleCompiler in preparation of upcoming changes.
Specifically the compileStylesheet() monster method was simplified by moving
the SCSS preprocessing (~ SCSS file concatenation) and CSS postprocessing (~
header insertion) into the caller. For the latter the necessary code already
resided in the caller and was passed in as a callback method.
While this new style compilation logic might look a bit like copy and paste it
should be no less readable by moving common logic into helper methods and by
simplifying the control and data flow with the removal of the callback.
It also allows us much greater control over the whole process, e.g. allowing us
to insert specific CSS for the frontend styles only.
final/*!comment for the CSS header