tasks.d.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { Pattern, PatternsGroup } from '../types/patterns';
  2. import { IOptions } from './options';
  3. export interface ITask {
  4. base: string;
  5. dynamic: boolean;
  6. patterns: Pattern[];
  7. positive: Pattern[];
  8. negative: Pattern[];
  9. }
  10. /**
  11. * Generate tasks based on parent directory of each pattern.
  12. */
  13. export declare function generate(patterns: Pattern[], options: IOptions): ITask[];
  14. /**
  15. * Convert patterns to tasks based on parent directory of each pattern.
  16. */
  17. export declare function convertPatternsToTasks(positive: Pattern[], negative: Pattern[], dynamic: boolean): ITask[];
  18. /**
  19. * Return only positive patterns.
  20. */
  21. export declare function getPositivePatterns(patterns: Pattern[]): Pattern[];
  22. /**
  23. * Return only negative patterns.
  24. */
  25. export declare function getNegativePatternsAsPositive(patterns: Pattern[], ignore: Pattern[]): Pattern[];
  26. /**
  27. * Group patterns by base directory of each pattern.
  28. */
  29. export declare function groupPatternsByBaseDirectory(patterns: Pattern[]): PatternsGroup;
  30. /**
  31. * Convert group of patterns to tasks.
  32. */
  33. export declare function convertPatternGroupsToTasks(positive: PatternsGroup, negative: PatternsGroup, dynamic: boolean): ITask[];
  34. /**
  35. * Returns those negative patterns whose base paths includes positive base path.
  36. */
  37. export declare function findLocalNegativePatterns(positiveBase: string, negative: PatternsGroup): Pattern[];
  38. /**
  39. * Create a task for positive and negative patterns.
  40. */
  41. export declare function convertPatternGroupToTask(base: string, positive: Pattern[], negative: Pattern[], dynamic: boolean): ITask;