buildExtensions property

  1. @override
Map<String, List<String>> get buildExtensions

Mapping from input file extension to output file extensions.

All input sources matching any key in this map will be passed as build step to this builder. Only files with the same basename and an extension from the values in this map are expected as outputs.

Implementation

@override
Map<String, List<String>> get buildExtensions => <String, List<String>>{
      r'$lib$': _isDirectoryExport &&
              FileSystemEntity.typeSync(importPath) ==
                  FileSystemEntityType.directory
          ? <String>{
              for (final FileSystemEntity entity
                  in Directory(importPath).listSync(recursive: true))
                joinAll(<String>[
                  ...split(_exportPath),
                  relative(
                    '${withoutExtension(entity.path)}$_suffix',
                    from: importPath,
                  ),
                ]),
            }.toList()
          : <String>[exportPath]
    };