anchor.diff:      // transformers, get the entry points, and delete the old entry points.
       var transformersSourceSpan = transformers.span;
       SourceSpan sourceSpan;
  -    bool monolithicPolymerTransformer = false;
  -    
  -    transformers.forEach((e) {
  -      if (e is YamlMap && e['polymer'] != null) {
  -        entryPoints.addAll(e['polymer']['entry_points']);
  -        if (e['polymer'].keys.length > 1) {
  -          // TODO(dgrove): handle the case where there are additional sections
  -          // in the polymer transformer.
  -          throw new UnimplementedError('Cannot handle non-entry_point entries '
  -              'for polymer transformer');
  -        }
  -        sourceSpan = e.span;
  -      } else if (e == 'polymer') {
  -        if (path.split(entryPoint)[0] == 'web') {
  -          // In this case, there's no need to add the entry point.
  -          monolithicPolymerTransformer = true;
  -        } else {
  +
  +    for (var e in transformers) {
  +      if (e != 'polymer' && (e is! YamlMap || e['polymer'] == null)) continue;
  +      if (e == 'polymer' || !e['polymer'].containsKey('entry_points')) {
  +        if (path.split(entryPoint)[0] != 'web') {
             print('WARNING: Did not add entry_point $entryPoint to pubspec.yaml'
                 ' because of already-existing transformer|polymer section');
  -          monolithicPolymerTransformer = true;
           }
  -      } 
  -    });
  -  
  -    if (monolithicPolymerTransformer) {
  -      return true;
  +        return false;
  +      } else if (e['polymer'].keys.length > 1) {
  +        // TODO(dgrove): handle the case where there are additional sections
  +        // in the polymer transformer.
  +        throw new UnimplementedError('Cannot handle non-entry_point entries '
  +            'for polymer transformer');
  +      } else {
  +        var existing = e['polymer']['entry_points'];
  +        entryPoints = existing == null ? [] :
  +            (existing is String ? [existing] : existing.toList());
  +
  +        if (entryPoints.contains(entryPoint)) return false;
  +        entryPoints.add(entryPoint);
  +
  +        sourceSpan = e.span;
  +      }
       }
  +
       if (sourceSpan == null) {
         // There were no polymer transformers.
         insertionPoint = transformersSourceSpan.start.offset;
  
positive.code: ''';
  
    new File(path.join(pubspecDir, entryPoint)).writeAsStringSync(html);
    
    var pubspecPath = path.join(pubspecDir, 'pubspec.yaml');
    var pubspecText = new File(pubspecPath).readAsStringSync();
    var transformers = loadYaml(pubspecText)['transformers'];
    var entryPoints = [entryPoint];
  
    var insertionPoint;
    var textToInsert = '';
  
negative.code:     print('Error creating files in $outputDir');
      exitCode = 1;
    }
  
    return;
  }
  
  