X Tutup
Skip to content

Implement file extension filter in DiffingBroccoliPlugin #1719

@IgorMinar

Description

@IgorMinar

Currently DiffingBroccoliPlugin provides full tree diff to plugins. This means that plugins that care about only .js or .ts files need to filter the diff themselves.

This operation is common enough that it should be implemented in the DiffingBroccoliPluginWrapper's rebuild method instead.

Proposal:

class MyPlugin implements DiffingBroccoliPlugin {
  static includeExtensions = ['.ts'];
  static excludeExtensions = ['.d.ts'];

  public rebuild(diffResult: DiffResult) {
    //diffResult contains only .ts files and no .d.ts files
  }
}

tasks:

  • add filtering into DiffingBroccoliPluginWrapper
  • refactor existing broccoli-typescript.ts and traceur/index.ts to rely on this feature

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup