You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new methods or constructor in CSSBuilder that accept ConfigInMemory (it's better to create new CSSBuilder constructor or a separate impl). This means:
Parsing/Collecting Classes (if needed):
Replace file reads with direct iteration over the provided strings in ConfigInMemory.projects.
Possibly reuse the same parsing logic (Parser) by adding a method like parse_classes_from_string(content: &str).
Minification/Optimization:
Reuse CSSOptimizer but feed it the concatenated or generated string from memory, not from files.
Return or store compiled CSS in some internal structure (e.g., (output_name, compiled_css)).
Acceptance Criteria
A new function, for example, CSSBuilder::new_in_memory(config: &ConfigInMemory, optimizer: &dyn CSSOptimizer, ...) -> Self (or an equivalent approach) is implemented.
The method reads CSS from content: Vec<String> rather than file paths.
For each in-memory project, returns (or stores) a compiled CSS string associated with output_name.
Existing file-based constructor or build() remains functional and unbroken.
The text was updated successfully, but these errors were encountered:
Description
Add new methods or constructor in
CSSBuilder
that acceptConfigInMemory
(it's better to create newCSSBuilder
constructor or a separateimpl
). This means:ConfigInMemory.projects
.Parser
) by adding a method likeparse_classes_from_string(content: &str)
.CSSOptimizer
but feed it the concatenated or generated string from memory, not from files.(output_name, compiled_css)
).Acceptance Criteria
CSSBuilder::new_in_memory(config: &ConfigInMemory, optimizer: &dyn CSSOptimizer, ...) -> Self
(or an equivalent approach) is implemented.Vec<String>
rather than file paths.output_name
.build()
remains functional and unbroken.The text was updated successfully, but these errors were encountered: