docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a tool that processes CSS Modules files containing composes declarations and transforms them into explicit import rules.
composes: button from "styles/button.css", the processor transforms it to use an explicit :import() rule and replaces the class name with a generated import identifier @testcomposes: primary secondary from "theme.css"), the processor creates separate import identifiers for each class @testcomposes: warning error from global, the processor wraps each global class with global() wrapper @testcomposes: button from "lib.css", alert from global), the processor correctly transforms both types @test/**
* Processes CSS content and transforms composes declarations
*
* @param {string} cssContent - The CSS content to process
* @returns {Promise<string>} The transformed CSS with :import() rules
*/
async function processCSS(cssContent) {
// IMPLEMENTATION HERE
}
module.exports = { processCSS };Provides CSS parsing and transformation capabilities.
Provides the core functionality for extracting and transforming CSS Modules composes declarations into explicit import rules.