combiningBuilder function

Builder combiningBuilder([
  1. BuilderOptions options = BuilderOptions.empty
])

Implementation

Builder combiningBuilder([BuilderOptions options = BuilderOptions.empty]) {
  final optionsMap = Map<String, dynamic>.from(options.config);

  final includePartName = optionsMap.remove('include_part_name') as bool?;
  final ignoreForFile = Set<String>.from(
    optionsMap.remove('ignore_for_file') as List? ?? <String>[],
  );
  final preamble = optionsMap.remove('preamble') as String? ?? '';
  final buildExtensions =
      validatedBuildExtensionsFrom(optionsMap, _defaultExtensions);

  final builder = CombiningBuilder(
    includePartName: includePartName,
    ignoreForFile: ignoreForFile,
    preamble: preamble,
    buildExtensions: buildExtensions,
  );

  if (optionsMap.isNotEmpty) {
    log.warning('These options were ignored: `$optionsMap`.');
  }
  return builder;
}