|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
|---|
| 3 | const IssueMatch_1 = require("./IssueMatch");
|
|---|
| 4 | const IssuePredicate_1 = require("./IssuePredicate");
|
|---|
| 5 | function createIssuePredicateFromOption(context, option) {
|
|---|
| 6 | if (Array.isArray(option)) {
|
|---|
| 7 | return IssuePredicate_1.composeIssuePredicates(option.map((option) => typeof option === 'function' ? option : IssueMatch_1.createIssuePredicateFromIssueMatch(context, option)));
|
|---|
| 8 | }
|
|---|
| 9 | return typeof option === 'function'
|
|---|
| 10 | ? option
|
|---|
| 11 | : IssueMatch_1.createIssuePredicateFromIssueMatch(context, option);
|
|---|
| 12 | }
|
|---|
| 13 | function createIssueConfiguration(compiler, options) {
|
|---|
| 14 | const context = compiler.options.context || process.cwd();
|
|---|
| 15 | if (!options) {
|
|---|
| 16 | options = {};
|
|---|
| 17 | }
|
|---|
| 18 | const include = options.include
|
|---|
| 19 | ? createIssuePredicateFromOption(context, options.include)
|
|---|
| 20 | : IssuePredicate_1.createTrivialIssuePredicate(true);
|
|---|
| 21 | const exclude = options.exclude
|
|---|
| 22 | ? createIssuePredicateFromOption(context, options.exclude)
|
|---|
| 23 | : IssuePredicate_1.createTrivialIssuePredicate(false);
|
|---|
| 24 | return {
|
|---|
| 25 | predicate: (issue) => include(issue) && !exclude(issue),
|
|---|
| 26 | };
|
|---|
| 27 | }
|
|---|
| 28 | exports.createIssueConfiguration = createIssueConfiguration;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.