tasks.d.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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: Pattern[], dynamic: boolean): ITask[];
  34. /**
  35. * Create a task for positive and negative patterns.
  36. */
  37. export declare function convertPatternGroupToTask(base: string, positive: Pattern[], negative: Pattern[], dynamic: boolean): ITask;