processStylesheet function

Future<Map<AssetId, String>> processStylesheet(
  1. BuildStep buildStep,
  2. AssetId stylesheetId,
  3. CompilerFlags flags
)

Implementation

Future<Map<AssetId, String>> processStylesheet(
  BuildStep buildStep,
  AssetId stylesheetId,
  CompilerFlags flags,
) async {
  final stylesheetUrl = toAssetUri(stylesheetId);
  final templateCompiler = createViewCompiler(buildStep, flags);
  final cssText = await buildStep.readAsString(stylesheetId);
  final sourceModules = templateCompiler.compileStylesheet(
    stylesheetUrl,
    cssText,
  );
  return _mapSourceByAssetId(sourceModules);
}